- Home /
How do I make Unity to print accentuated letters?
For example: , , , , , ,
To console and on TextMesh when changing it from a script.
TextMesh accepts and writes these chars in the Inspector with a "ttf" font but skips them when I change the .text property of it from script. Also couldn't "print" these letters to Console.
Answer by Zib Redlektab · Dec 03, 2010 at 02:16 PM
In your text editor (Unitron?), make sure the text encoding is set to Unicode.
I can't see the coherence :S I forgot to mention I'm on Windows platform. I don't know if it makes any sense. I'm using Unity's attached script editor and it allows me those chars to write in the source code, just Unity doesn't outputs them from code.
Well, when I ran into this problem, the text was being encoded with "Western" (as it is in the image above), and I just needed to switch it to Unicode. The accents displayed fine in the source code, but not in-game.
You need to look around in the options or menus of the script editor (Unitron is the editor that comes with Unity for $$anonymous$$ac, I don't know what it is for Windows) for a Text Encoding option.
Answer by BitMiller · Dec 08, 2010 at 09:13 AM
Huh, I've got it. In UniSciTE (default Unity script editor on Win) choose File->Encoding->UTF-8.
If you do this on a script that already includes these characters it will freeze on the second script file! So save your works before doing this! After you're done and not freezed to death, you'll have to rewrite those characters in the script because they'll be replaced with special little image thingies.
Your answer
Follow this Question
Related Questions
Custom Font works in editor but not in build 2 Answers
How to change text on a TextMesh with a non-dynamic font on iOS? 2 Answers
TextMeshProUGUI Font Disappearing on Low FPS,Unity TextMeshProUGUI Font Disappearing 0 Answers
How to fix TextMeshPro breaking lines and escaping random characters? 0 Answers