Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by tneshi · Feb 26, 2012 at 09:12 AM · guifontunicodeutf-8

Umlaut shown as ?? in GUILayout.Button

I have interactions that have a name. This name is set in a script, like so:

 public void Awake() {
     InteractionName = "Holz fällen";
 }

And then shown in a GUI like so:

 GUILayout.Button(interaction.InteractionName)

  • I am using MonoDevlop under Mac. The scripts are UTF8 encoded.

  • My GUI skin uses Arial, which contains German umlauts. I set Unicode for the font importer.

What else could be going wrong?

(I cannot set the name in the inspector at the moment, see other question.)

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Feb 26, 2012 at 10:10 AM 0
Share

Are you sure it's actually saved as UTF-8, because it works fine here.

avatar image tneshi · Feb 26, 2012 at 01:31 PM 0
Share

I used Save As, so I can manually select the encoding. I set it to UTF-8. I just tripple-checked it now.

But if I set the interactionName in the inspector, the umlaut is displayed properly. So it is definitely not related to the font.

If the source file is UTF-8, can it be compiled wrong, i.e. read by the compiler as not UTF-8 or something like that?

avatar image tneshi · Feb 26, 2012 at 04:13 PM 0
Share

It does work with UTF-16! Why it would not work with UTF-8 is beyond my imagination.

avatar image Eric5h5 · Feb 26, 2012 at 09:31 PM 0
Share

It's some bug with $$anonymous$$onoDevelop not really using UTF-8 then, because it does work with UTF-8 in other editors.

avatar image tneshi · Feb 27, 2012 at 08:18 PM 0
Share

I switched to Text$$anonymous$$ate and the problem still exists. I write lots of code in UTF8 with Text$$anonymous$$ate all the time, so I am pretty confident, that it's not a editor issue either.

Are there compiler settings in Unity somewhere that could miss a flag or something?

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by adamonline45 · Feb 28, 2012 at 01:15 AM

You may find the information you need here:

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

It mentions using UTF-16, and caveats with the default Arial font, particularly on the iPhone.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Kashrlyyk · May 24, 2012 at 07:29 PM

I used "notepad++" to convert all the c# scripts to "UTF-8" and then the umlaute worked.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Kaysiy · Jan 23, 2020 at 09:34 PM

check this: https://www.youtube.com/watch?v=_i_WG76Skf4

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Display TM symbol in enum on GUI 1 Answer

Why aren't asian fonts rendering dynamically? 0 Answers

Is there a way to measure the pixel with/height of a string with a given font? 2 Answers

UTF-8 Support in Unity iPhone 1.6? 2 Answers

french accent and dynamic fonts 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges