BlitzMax can't read Cyrillic.

Archives Forums/BlitzMax Bug Reports/BlitzMax can't read Cyrillic.

Oddball(Posted 2012) [#1]
If a file/folder has Cyrillic characters in it's path then BlitzMax doesn't appear to be able to read/write from/to it.

This wouldn't really be an issue except if the users windows username has Cyrillic characters in it then I'm not able to read/write any files/folders from %APPDATA%, 'my documents', etc.

Apparently there are a lot of gamers who have Cryllic characters in there names/usernames.

Last edited 2012


Oddball(Posted 2012) [#2]
Is there no official response on this? I have a lot of Russian/Eastern European customers which this issue affects. I guess I'll have to go with a workaround.


skidracer(Posted 2012) [#3]
I have just tested BlitzMax commands with a file and directory named

Безымянный2

[edit] well bb.com is not so unicode friendly...

and found no problems under Windows.

What commands are you using to fetch these directory names?

Last edited 2012


xlsior(Posted 2012) [#4]
Also, are you using a recent version of Blitzmax?

Some of the earlier releases did NOT support unicode, but at some point in the past that supposedly got fixed.

(Note: according to versions.txt, it appears that a bunch of unicode fixes were part of the blitzmax 1.33, with some additional tweaks in 1.34)

Last edited 2012


Oddball(Posted 2012) [#5]
The file functions fail silently so no error is given, and even report success when they fail. I am using the latest version of BlitzMax.

First create a folder called "¬¡¬£¬¤¬¥¬Ø©ø". You can put it anywhere, I put it in the document folder.
EDIT Hmm it seems the forum can't understand Cyrillic either. Just use character mapper to make a cyrillic folder.

Then run the following code
Local test:String
RequestDir(test)

Print RealPath(test)
Print FileType(RealPath(test))

Local test2:String=test+"/test.txt"
Print CreateFile(test2)


Use the dir requester to select your new cyrillic folder. FileType says the folder exists, and CreateFile says the file was created, but looking in windows explorer shows nothing actually happened.

This isn't just a problem with Cyrillic, I've had it repoted with other non-standard characters too.

Last edited 2012


skidracer(Posted 2012) [#6]
That code works fine on a cyrillic dir (after prepending "test=" to line 2).


Oddball(Posted 2012) [#7]
Ah, yes sorry. I messed up the example code. I'll try and post something showing the problem I am having more accurately when I can get on my Windows machine. But my game does fail to create files when the players username has cyrillic in it. I can create a folder in %APPDATA% but then can't create files within that folder. Maybe I'm doing something that corrupts the cyrillic in between. Ill investigate further.


Oddball(Posted 2012) [#8]
Oops, double post.

Last edited 2012


Oddball(Posted 2012) [#9]
It seems I was premature in blaming BlitzMax. My excuse is that I'm tired and stressed this week. The problem appears to stem from Brucey's libxml module. It converts the filename to a C string, which I think causes the problem.

Import bah.persistence

Type Bar
	Field foobar:Int
End Type

Local Foo:Bar=New Bar

Local test:String=RequestDir("test")

Print RealPath(test)
Print FileType(RealPath(test))

Local test2:String=test+"/foobar.xml"
New TPersist.SerializeToFile Foo,test2


I'm going to go with a workaround. Thanks Simon for pointing me in the correct direction.

Last edited 2012