Localisation and ZIP files
by Pavel Tovarys · in Torque Game Engine · 02/11/2008 (7:07 am) · 7 replies
Hi!
When we use data of our games packed in ZIP archive (in TGE/TGB), the Torque crashes when there are non-English characters in a path of installed game. And a lot of localized Windows have non-English characters in for example "Program files" folder name. Does anybody know how to solve this problem?
Thank you,
Pavel T..
When we use data of our games packed in ZIP archive (in TGE/TGB), the Torque crashes when there are non-English characters in a path of installed game. And a lot of localized Windows have non-English characters in for example "Program files" folder name. Does anybody know how to solve this problem?
Thank you,
Pavel T..
#2
In many localized Windows the "Program Files" folder named differently, or the user can choose to install into separate folder like "C:\Games" but the "Games" are written in "user-native" language.
And this is where the problem appears.
Pavel: I've just tested it with our project - it seems to be working fine. Though we are using heavily modded engine, and I have custom ZIP implementation (mixed the standard zip support + parts from TGB + parts from Zip2.0 resource). No problems at all here.
02/11/2008 (10:27 am)
Marc - he say that Torque crashes if it's run from a folder with non-enginsh characters.In many localized Windows the "Program Files" folder named differently, or the user can choose to install into separate folder like "C:\Games" but the "Games" are written in "user-native" language.
And this is where the problem appears.
Pavel: I've just tested it with our project - it seems to be working fine. Though we are using heavily modded engine, and I have custom ZIP implementation (mixed the standard zip support + parts from TGB + parts from Zip2.0 resource). No problems at all here.
#3
Can you confirm that you have seen a problem with non-English characters above the install folder when unzipping resources? Or is perhaps the problem only with problem characters used below the installation folder (where the developer can carefully control the folder structure to keep them out).
Please let us know what zip system you are using (perhaps there is a standard one included with TGB. I apologize, but I don't have TGB and so am not aware.) For example, I use "7zip" now to create my zipped resource files.
02/11/2008 (12:19 pm)
Pavel: Can you confirm that you have seen a problem with non-English characters above the install folder when unzipping resources? Or is perhaps the problem only with problem characters used below the installation folder (where the developer can carefully control the folder structure to keep them out).
Please let us know what zip system you are using (perhaps there is a standard one included with TGB. I apologize, but I don't have TGB and so am not aware.) For example, I use "7zip" now to create my zipped resource files.
#4
Matthew: yes, it is happened when the non-English characters are above the install folder. So for example
this works:
C:\Program files\my game\
and this doesn't work:
C:\nonenglishcharacters\my game\
I tested TGB 1.3 and TGE 1.5.2, I have not changed the zip support.
For packing I used Winzip 11, Winzip 8, zip in Rar and in Total commander.
I will try to install some of zip resources, I hope some of them will help me.
02/11/2008 (3:33 pm)
Thanks to everyone for your help!Matthew: yes, it is happened when the non-English characters are above the install folder. So for example
this works:
C:\Program files\my game\
and this doesn't work:
C:\nonenglishcharacters\my game\
I tested TGB 1.3 and TGE 1.5.2, I have not changed the zip support.
For packing I used Winzip 11, Winzip 8, zip in Rar and in Total commander.
I will try to install some of zip resources, I hope some of them will help me.
#5
See this post in the bugs forum for more details and the code change:
www.garagegames.com/mg/forums/result.thread.php?qt=72297
Warning: Changing the encoding of the Platform::getWorkingDirectory() could be a far reaching change. I haven't adequately regression tested this yet myself, although I have seen no issues yet.
02/21/2008 (9:36 am)
I have fixed this "Zip'd mod finding bug" in my code (only tested for Windows) by converting the winFileio.cc routine Platform::getWorkingDirectory() to returning a UTF-8 encoded path, rather than the previous ANSI (Latin-1?) encoded path. See this post in the bugs forum for more details and the code change:
www.garagegames.com/mg/forums/result.thread.php?qt=72297
Warning: Changing the encoding of the Platform::getWorkingDirectory() could be a far reaching change. I haven't adequately regression tested this yet myself, although I have seen no issues yet.
#6
Note also that Torque's Unicode system doesn't work beyond the Basic Multilingual Plane (BMP) so some of the infrequently used characters will likely still cause failures. (Only safe for single word UTF-16 characters.)
02/21/2008 (9:43 am)
Did you guys see this bug on non-Windows platforms? My understanding is that Windows and Mac OSX, at least, use UTF-16. Note also that Torque's Unicode system doesn't work beyond the Basic Multilingual Plane (BMP) so some of the infrequently used characters will likely still cause failures. (Only safe for single word UTF-16 characters.)
#7
I have not tested this problem on Macs, but I will try to test it during this weekend.
02/21/2008 (1:25 pm)
Matthew: I tested it with Czech characters and it works well (Windows), thanks! I will send it to our betatesters.I have not tested this problem on Macs, but I will try to test it during this weekend.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft