GuiTextEditCtrl unicode entry problems
by Gabriel Sibley · in Torque Game Builder · 05/18/2010 (8:14 am) · 2 replies
Hi,
We're trying to localize our game but have found that trying to type non-latin characters into a GuiTextEditCtrl produces '?'s instead of the desired characters. Is there a way to get a GuiTextEditCtrl to accept non-latin characters?
The font being used definitely supports the characters we're trying to type - we can set up the default text of the control to display non-latin characters and that works fine.
Interestingly we can type in non-latin characters in the console. We've tried to mimic that by using a GuiConsoleEditCtrl instead of a GuiTextEditCtrl for our GUI but it did not help.
Any help would be much appreciated - an extensive search through the forum archives hasn't turned up any useful information and we really want to release our game in other languages!
We're trying to localize our game but have found that trying to type non-latin characters into a GuiTextEditCtrl produces '?'s instead of the desired characters. Is there a way to get a GuiTextEditCtrl to accept non-latin characters?
The font being used definitely supports the characters we're trying to type - we can set up the default text of the control to display non-latin characters and that works fine.
Interestingly we can type in non-latin characters in the console. We've tried to mimic that by using a GuiConsoleEditCtrl instead of a GuiTextEditCtrl for our GUI but it did not help.
Any help would be much appreciated - an extensive search through the forum archives hasn't turned up any useful information and we really want to release our game in other languages!
#2
When you type non-Latin characters, the cursor moves forwards. However, some characters are boxes and others do not appear at all. The cursor does not move forward by the width of the characters in all cases, so it does not match the end of the line.
Note again that this font and GuiTextEditCtrl are definitely capable of displaying the Cyrillic characters we are trying to enter. Setting the text property via script works fine.
Does anyone know anything about this issue? How to fix it, or even what we should look at next?
05/20/2010 (7:41 am)
After some further research, we noticed that the TGB console calls deactivateKeyboard() when it appears, and activateKeyboard() when it disappears. We tried doing the same, with the following results:When you type non-Latin characters, the cursor moves forwards. However, some characters are boxes and others do not appear at all. The cursor does not move forward by the width of the characters in all cases, so it does not match the end of the line.
Note again that this font and GuiTextEditCtrl are definitely capable of displaying the Cyrillic characters we are trying to enter. Setting the text property via script works fine.
Does anyone know anything about this issue? How to fix it, or even what we should look at next?
Torque Owner Daniel Brauer
The fact that it works in the console and if we set control.text ahead of time is the confusing part. Somewhere along the way, input is getting screwed up.