Author Topic: Unicode character error when concatenating  (Read 4261 times)

Dark Acre Jack

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
  • Cyberdrunk
    • View Profile
    • Dark Acre Games
Unicode character error when concatenating
« on: September 27, 2013, 06:55:42 PM »
Hello! First of all, excellent job with NGUI, don't know what I'd do without it. Keep up the great work.

My issue is this: when using the "degree" symbol, °, in a static label there's no trouble. But when I try using it to concatenate dynamically, I get this error:



To be clear: it works when setting up the label (manually typing the string in) as well as setting as a straight string, i.e. labelAngle.text = "0° H | 0° V";

Is this a known issue? I've tried with Encoding ticked/unticked, too, same story.

Cheers & thanks for any help with this matter.

P.S. I also know that a workaround would be setting up static labels for the "° H" and "° V" bits & that's fine but if there's a solution to having a single dynamic string I'm all ears :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unicode character error when concatenating
« Reply #1 on: September 27, 2013, 07:07:52 PM »
You need to save your file as UTF-8 with signature in order to use those kind of symbols.

Dark Acre Jack

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
  • Cyberdrunk
    • View Profile
    • Dark Acre Games
Re: Unicode character error when concatenating
« Reply #2 on: September 27, 2013, 07:14:15 PM »
Okay, looks like I'd have to go to something other than Monodevelop to do signature management so for me it'll be less of a pain to just set up custom standalone labels for the degrees stuff.

Thanks for the quick response, Aren. Cheers.