Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by Daniel Greenhorn · Jan 08, 2015 at 04:46 PM · errorcharacterfontsymbolcs1525

Font probem - extended characters

Does anyone know why a string that contains latin characters is being displayed with errors?

Here is an example (notice the latin character "ă", that sounds like a in "another" instead of a in "hause"):

 matr_stringuri [88, 2] = "furnică";

Here is what a GUIText displays this array element as:

alt text

Until 2 days ago this worked fine, when MonoDevelop had a saving problem (something about loosing some content or ASCII characters,,, did not pay attention at the time). For strings without those special characters, the code works fine.

I imported the Arial font that I know has those characters and assigned it to the GUI. Did not solve the problem.

Also, Unity started raising this error "(script_1.cs(4190,37): error CS1525: Unexpected symbol ', expecting )', ,', ;', [', or =')" even though MonoDevelop accepted this code ( matr_stringuri [20, 1] = "ă")

 bool LiteraĂ = GUI.Button(new Rect(20+10/10*distanta_intre_litere,(primul_rand -matr_floaturi [20, 1]*20 ),latime_litera,inaltime_litera), matr_stringuri [20,1], alfabetStyle);
         

If I remove the latin character, Unity runs but with the display problem I mentionned:

 bool LiteraAA = GUI.Button(new Rect(20+10/10*distanta_intre_litere,(primul_rand -matr_floaturi [20, 1]*20 ),latime_litera,inaltime_litera), matr_stringuri [20,1], alfabetStyle);

Again, the code worked fine 2 days ago.

I've re-writen the code, even copy pasted it from a backup. For the life of me I don't understand this problem.

Help please.

font problem.jpg (4.1 kB)
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by jpthek9 · Jan 08, 2015 at 04:53 PM

Hmm... that's really strange. Have you considered that it might be an issue of the font and not the software? Try using a different font or the one you were using before.

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 Daniel Greenhorn · Jan 09, 2015 at 04:42 AM

Hi, jpthek9 I did indeed thought it may be a font problem (or windows settings problem).

Until 2 days ago I used the default Arial Unity font. Imported 2 fonts that have those characters (ARIAL and LIBERATION SANS). Did not help. One of the 2 GUITexts I found this morning to be using a font ARIAL and the other Unity's Arial. Changed them both to each of the fonts.

I had a hunch it was a MonoDevelop problem so I disabled this script, created a new one and loaded it from an older backup copy. The latin letters returned to normal...

I'll have to figure it out why it worked then and not now...

Maybe when the Monodevelop save problem occured (I had to open the script from a MonoDevelop backup file), it saved to a default format that did not know those special characters even though they were written correctly. Subsequent edits on that script file inherited the problem. Or, more likely, a format that Unity can't fully display (errors in Unity not in monodevelop).

Maybe the problem is caused by the script being 4122 lines long? 3k are loading static array values. Also, Monodevelop does not minimize sometimes.

The problem did solve when I created a new script file from scratch.

I'll update as I find more or my hunch is confirmed.

Comment
Add comment · Show 2 · 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 jpthek9 · Jan 09, 2015 at 05:25 AM 0
Share

I'm glad you got it working! Yeah, I'm not so sure about the really technical aspects of computers but gawsh that's a lot of static variables.

avatar image Daniel Greenhorn · Jan 09, 2015 at 05:54 AM 0
Share

Well it's an alphabet game so it had to be big (word+img+spoken). Would have used a xls file ins$$anonymous$$d but could not figure out the way to make it work.

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

26 People are following this question.

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

Related Questions

Error unexpected symbol 'internal' What is wrong with this? 0 Answers

How to find a font via script? 2 Answers

Quill18's Tutorial Scripts: Unexpected Symbols 1 Answer

Third person controller error in line 333 and 337 1 Answer

error CS1525, please help 0 Answers


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