x


guiText.Text do not display text correctly

I am trying to display some text in guiText.text with some special characters like "ç" or "ã" Those characters are showed like "ç" and "ã". Sounds like a string encoding problem.

I have tried to save script files in other encodings but it still fails.

Someone solve this issue?

more ▼

asked Nov 09 '11 at 10:17 PM

RichardKbr gravatar image

RichardKbr
16 1 1 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It works if you save the script as UTF-8.

more ▼

answered Nov 09 '11 at 10:58 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

Do not work for me. I open script file with notepad++ then save in UTF-8.

I am following the example of the book Essentials. Who needs font named sugo, download from http://www.dafont.com/ But this font is .otf. (maybe the problem is the font)

Nov 10 '11 at 11:05 AM RichardKbr

Sorry for delay!

  • Open script in notepad++
  • Select Encoding (in menu)
  • Convert to UTF8

obs - For me files are UTF8 without BOM (without BOM do not work for me).

How to solve

Dec 22 '11 at 04:26 PM RichardKbr
(comments are locked)
10|3000 characters needed characters left

You have to use a font that supports UTF (or whatever encoding you need).

You might also have to change the font's Character Setting in the Inspector:

alt text

Here's what the docs say:

http://unity3d.com/support/documentation/Components/class-Font.html

more ▼

answered Nov 09 '11 at 11:24 PM

jahroy gravatar image

jahroy
3.2k 14 18 41

Sorry, but did not work for me. Maybe problem is the font named sugo downloaded from http://www.dafont.com/ (fails whit arial too).

I tried this approach (change Dynamic to: Unicode or ASCII) did not work and is very slow even when the text shows.

Nov 10 '11 at 11:13 AM RichardKbr
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3689
x553
x313
x21

asked: Nov 09 '11 at 10:17 PM

Seen: 1765 times

Last Updated: Feb 22 at 10:31 AM