Scandinavian letters 'Æ', 'Ø' and 'Å'

Whenever I use these letters in e.g. GUI, they always come out like this: “??” instead… I suspect that it has something to do with the encoding of the scripts I’m using, but AFAIK MonoDevelop is already using UTF-8 as default.

This is based is this thread on the forums…

So, have anyone had the same problem and maybe a solution to it?

UPDATE: I tried to save one of my scripts containing the special characters as UTF-16 in MonoDevelop and then use that script instead of the default UTF-8. Still question marks instead of ‘æ’, ‘ø’ and ‘å’…

You should use UTF-16 (UCS-2 Little Endian), not UTF-8.

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

You also need to use a font that support those characters.

If you “type” the unicode characters in your editor you might run into such issues, especially when using your source code on multiple platforms or in different editors.

As a first solution you can hard code the unicode character into your text, something like:

		Debug.Log ("Fran\u00E7ais");

This will ensure a proper display in the console and in the GUI.

However, hard coding strings into your source code isn’t considered the best practice. If you need lots of (international) text, consider saving it in an asset file (also useful for localization), where you can ensure that it’s stored with the proper encoding.link text