Recognizing "" character in a string
by Isaac Barbosa · in Torque Game Builder · 05/17/2007 (11:28 am) · 22 replies
Hello,
I have my word game in english almost done. I've started to work in the spanish version. But it seems to be a problem to be able to recognize the "
I have my word game in english almost done. I've started to work in the spanish version. But it seems to be a problem to be able to recognize the "
#2
05/18/2007 (7:29 am)
Thanks Igor, I see that there is a problem with my post since there is a not viewable character. In spanish we have a character between n and o (first charecter right of l in my computer) that is an n with an ~ on top of it. I guess there is no a way to do that in a simple way so I have figured a trick that is working now.
#3
There is no way to seperate those two, as they form a single ascii, not an UTF16 combination.
(n" in this case is n tilde but the board is US based so is incapable of showing more than plain characters ...)
05/18/2007 (7:34 am)
You should be able to find it if you add an ascii table with the entries for n" etcThere is no way to seperate those two, as they form a single ascii, not an UTF16 combination.
(n" in this case is n tilde but the board is US based so is incapable of showing more than plain characters ...)
#4
05/18/2007 (12:22 pm)
Is there a way to use asci then? how can I do to echo an ascci character and how can I set one as a variable?
#5
05/22/2007 (10:49 pm)
Use should use escape characters again:\xhh two-digit hex value ASCII code
#6
Thanks, but I can't understand what you mean. Can you be more specific with that code?
05/23/2007 (7:28 am)
@ Igor,Thanks, but I can't understand what you mean. Can you be more specific with that code?
#7
For example
05/23/2007 (10:26 pm)
You need to find ASCII code for the character you need and use it. Since you need international symbol an ASCII code for it is in range F0-FF. But you should be aware that this way will not be friendly for a further localization.For example
echo("\xFF"); // => prints last character in ASCII table
#8
06/01/2007 (5:59 pm)
Thanks Igor. so I should use another method to get what I want :)
#9
Like Isaac, I'm trying to translate into Spanish. Here are some things that I've tried:
(a) I assigned the following text to a profile, but it didn't render the non-english character. It just gave me a y thing:

(b) I assigned the following text to a profile, using the Igor's ASCII code, but again, the same results:

This is the result I get when I run the game. It happens when I try to use (a) or (b) above:

Does anyone know why non-english characters aren't rendering? Any idea how this can be fixed?
06/06/2007 (4:56 pm)
I'm having the exact same problem with translating my game. Any non-english characters are replaced with an odd-looking y. I'm using a true type font with all of the non-english characters available in it and still the problem persists. I've also tried using Arial TTF, just to make sure I wasn't insane.Like Isaac, I'm trying to translate into Spanish. Here are some things that I've tried:
(a) I assigned the following text to a profile, but it didn't render the non-english character. It just gave me a y thing:
(b) I assigned the following text to a profile, using the Igor's ASCII code, but again, the same results:
This is the result I get when I run the game. It happens when I try to use (a) or (b) above:
Does anyone know why non-english characters aren't rendering? Any idea how this can be fixed?
#10
There is 128 intarnational chars in the ASCII table, you could find any appropriate char in this table.
06/06/2007 (10:23 pm)
Are you sure what FF code is your "e" (in example of 'Creditors:', sorry I havn't this char)?There is 128 intarnational chars in the ASCII table, you could find any appropriate char in this table.
#11
06/08/2007 (10:09 am)
Just tried the one for the lowercase umlaut (\x80), but it didn't work. I still get that weird y character. Hmm, it looks like I'm having problems with ACII-II. Everything in the ACII-I list works like it should.
#12
I should use only capital letters to avoid that annoying problem.
@Amaranthia: It should be great to have a look at your game in spanish :)
06/09/2007 (2:53 pm)
Problem still unsolved :(I should use only capital letters to avoid that annoying problem.
@Amaranthia: It should be great to have a look at your game in spanish :)
#13
here is a full ascii table. To convert just take that number, open calc on windows (just press windows key + r and enter calc and press enter), enter the given ascii as dec and change to hex :) *you need to have scientific mode enabled)
http://www.blitzbase.de/tabellen/asciicodes.htm
06/09/2007 (3:02 pm)
The correct ascii for that e is not FF, its E9here is a full ascii table. To convert just take that number, open calc on windows (just press windows key + r and enter calc and press enter), enter the given ascii as dec and change to hex :) *you need to have scientific mode enabled)
http://www.blitzbase.de/tabellen/asciicodes.htm
#14
Or use the CodeWeaver - it's unicode-safe and hey, it's TorqueScript IDE (and free)!
Btw, if you are about GUI's, you can use build-in Torque GUI Editor and directly type there what you need. When you save your GUIs, Torque keeps the text in unicode.
If it's about scripts - see above.
More info on that:
Torque Localization
Torque Unicode
and more: Automatic Translation
06/09/2007 (6:36 pm)
As for the "non-english" characters you need to get a Unicode-editor (any notepad-like software that can save files in unicode but without BOM header).Or use the CodeWeaver - it's unicode-safe and hey, it's TorqueScript IDE (and free)!
Btw, if you are about GUI's, you can use build-in Torque GUI Editor and directly type there what you need. When you save your GUIs, Torque keeps the text in unicode.
If it's about scripts - see above.
More info on that:
Torque Localization
Torque Unicode
and more: Automatic Translation
#15
Bank, I tried entering the special characters in the gui editor, but it just prints out the y character as I type.
06/12/2007 (10:25 am)
Still no luck, Marc. The elusive y character still shows up. Isaac, my partner Bryce is looking into the problem. He's located the place in the engine where the problem occurs and is trying to figure out how to fix it. The values render from the engine, but as soon as you pass them into script, they get messed up. We're hoping to have a fix by Friday.Bank, I tried entering the special characters in the gui editor, but it just prints out the y character as I type.
#16
This is my opinion as native spanish player: it is better to read capital letters thatn lower letters, in the case of short texts. If you use a nice font it will be even better than upper and lower letters... but as I have stated, this is just my opinion. If you can solve that problem it will be great, but if not, or if it is a great pain, be confident and use just capital to avoid
06/12/2007 (11:34 am)
@Amaranthia,This is my opinion as native spanish player: it is better to read capital letters thatn lower letters, in the case of short texts. If you use a nice font it will be even better than upper and lower letters... but as I have stated, this is just my opinion. If you can solve that problem it will be great, but if not, or if it is a great pain, be confident and use just capital to avoid
#17
06/20/2007 (9:22 am)
Isaac, were you able to get your spanish characters to show up? I have the same problem when I use capital letters and lowercase letters...
#18
I'm not an expert programmer and I was unable to show any "spanish" relative character, so I'm using a cool font that shows only capital letters. Of course, first character in a phrase is bigger than the others. If that the case we don't need to see specific characters.
I know is not the ideal solution but you should try a nice font with only capital letters. That is very aceptable for any spanish speaker ;)
Sorry for my english grammar!
06/20/2007 (4:22 pm)
@Amaranthia:I'm not an expert programmer and I was unable to show any "spanish" relative character, so I'm using a cool font that shows only capital letters. Of course, first character in a phrase is bigger than the others. If that the case we don't need to see specific characters.
I know is not the ideal solution but you should try a nice font with only capital letters. That is very aceptable for any spanish speaker ;)
Sorry for my english grammar!
#19
Since TGB is english native, maybe what we are looking for with non english character is not possible or would be a great pain. Use a just capitals font and you will be fine ;)
Lower characters should be smaller than Upper characters, but every one is a capital letter. That will work for sure as last alternative.
06/20/2007 (4:30 pm)
@Amaranthia:Since TGB is english native, maybe what we are looking for with non english character is not possible or would be a great pain. Use a just capitals font and you will be fine ;)
Lower characters should be smaller than Upper characters, but every one is a capital letter. That will work for sure as last alternative.
#20
06/25/2007 (2:59 pm)
Isaac, my partner Bryce found the problem. The current UTF-8 converter is broken. We'll have a fix in the Bug forum tomorrow.
Torque Owner Igor Kuryatnikov
For example:
echo(" \" ");prints "