trouble with international charsets
by William Swilling · in Torque Game Engine · 01/25/2010 (12:36 am) · 4 replies
I am having trouble displaying some international characters, namely accented vowels (or an n with a tilde(~) over it). I populated the font cache using the command populateFontCacheRange("Arial Bold", 18, 0, 591) in order to make sure I had all of the characters stored. Whenever I type a string with these characters into the console, or I display a message with them straight from script, the characters still appear as empty squares. I did a cache dump, and it said it had the characters I populated it with. Does anyone have any solution to this?
#2
I normally do all of my scripting in Torsion. It is going to be a pain editing all of these strings in a separate UTF-8 capable editor. Does anyone know if there is a way to make Torsion automatically save in this format, or a way to type these characters into the Torque console?
01/25/2010 (3:39 pm)
@Erick - I had to use Google Translator to get a sense of what the blog suggested. I used UltraEdit-32 and converted the .cs file to UTF-8, and it worked! Thank you for pointing me to this, but I do have another question. I normally do all of my scripting in Torsion. It is going to be a pain editing all of these strings in a separate UTF-8 capable editor. Does anyone know if there is a way to make Torsion automatically save in this format, or a way to type these characters into the Torque console?
#3
I just started localization and I'm having the same problem.
I can get the accents to work if when saving as UTF-8 but I would also like to keep using Torsion so the goal is to build a string table so only this file will be saved as UTF-8.
The problem is that if I'm trying to read a global variable like $UNI_MM_01 = "äåéþüúíóöáßæµ"; from a different .cs file it doesn't work. it only works when I read it from the same file.
I have a feeling that this is the reason Torque has a language system which works but seems very buggy .
http://tdn.garagegames.com/wiki/TorqueLocalization
I'll keep you update if I figure it out.
01/27/2010 (9:11 pm)
Hi William.I just started localization and I'm having the same problem.
I can get the accents to work if when saving as UTF-8 but I would also like to keep using Torsion so the goal is to build a string table so only this file will be saved as UTF-8.
The problem is that if I'm trying to read a global variable like $UNI_MM_01 = "äåéþüúíóöáßæµ"; from a different .cs file it doesn't work. it only works when I read it from the same file.
I have a feeling that this is the reason Torque has a language system which works but seems very buggy .
http://tdn.garagegames.com/wiki/TorqueLocalization
I'll keep you update if I figure it out.
#4
So basically I create a englishLang.cs file with all the strings.:
$UNI_MM_01 = "äåéþüúíóöáßæµ";
$UNI_MM_02 = "äåéþüúíóöáßæµ";
etc....
this file is the only one being saved as UTF-8.
then I just reference the global variables as needed.
01/27/2010 (10:34 pm)
Actually, it does work. I just had a mistake.So basically I create a englishLang.cs file with all the strings.:
$UNI_MM_01 = "äåéþüúíóöáßæµ";
$UNI_MM_02 = "äåéþüúíóöáßæµ";
etc....
this file is the only one being saved as UTF-8.
then I just reference the global variables as needed.
Torque 3D Owner ERICK MIRANDA M
http://www.torquesil.com/blog/?p=150