Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / file name not in english

Author
Message
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jan 2015 13:51 Edited at: 27th Jan 2015 13:52
Hi guys:

if a file name is not written in english my software will crash when "open to read/write" are used.

is there any solution for it?

thanks

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jan 2015 15:28 Edited at: 27th Jan 2015 15:50
Quote: "is there any solution for it?"




Edit Couldn't resist trying this.

Following code works fine:



Image attached.

Perhaps we need more info?

Edit2 This works too:





Powered by Free Banners
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jan 2015 16:04
Thanks green gandalf but, what if the file name is written in chineese

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jan 2015 17:27
I guess the problem is with the ascii codes. How are you writing your filenames? Perhaps the characters you are trying to use are not valid in filenames?



Powered by Free Banners
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 27th Jan 2015 20:39
I can imagine this not being possible since DBPro can only use 8-bit ((extended) ascii) strings, whereas chinese would require some kind of 16-bit unicode representation.
It is possible that you could recreate the needed string such that you use 2 characters per "foreign" character, however if there are any zero bytes in there that will be interpreted as a string terminator by DBP so it wouldn't be foolproof.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 27th Jan 2015 23:38
The filename is hardcoded or inputted during runtime?

pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 29th Jan 2015 01:36 Edited at: 29th Jan 2015 01:37


"open to read/write"

windowsXp
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 29th Jan 2015 16:48
Thanks PC raider but the file name you made is in english. we're looking for a filename written in another language.

there must be a solution out there. how about the guys who live in another country in europe.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jan 2015 20:20
I very much doubt the problem is the language itself. It seems to be far more likely to be the particular characters you are using. If the character set in the language you're using uses character codes which the system thinks aren't allowed then I'd expect a crash. Could you supply a simple short example which shows the problem because I can only get a crash if the filename contains disallowed character codes?



Powered by Free Banners
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 29th Jan 2015 21:52
I repeat,

The filename is hardcoded or inputted during runtime?

Login to post a reply

Server time is: 2026-07-05 03:50:56
Your offset time is: 2026-07-05 03:50:56