Author Topic: this "•" symbol won't work through code!?  (Read 2098 times)

Lando100

  • Guest
this "•" symbol won't work through code!?
« on: November 21, 2012, 11:57:05 AM »
if I enter "•" through code e.g. UILabel.text = string1 + " • " + string2; the "•" appears as "???" but if i enter it manually in the inspector it appears fine!!!!!

Is this a bug or am I missing something? this has also happened with some other special characters in the past such as "°", any help or clarity would be great.

Thanks
Lando

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: this "•" symbol won't work through code!?
« Reply #1 on: November 21, 2012, 05:23:43 PM »
Hmm, I'm not sure to be honest. Perhaps the code is defined as UTF 8 and that doesn't translate directly into string literals all that well?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: this "•" symbol won't work through code!?
« Reply #2 on: November 21, 2012, 05:27:04 PM »
It's because of how your code file is saved. The string you're passing isn't actually UTF8, so it can't process characters like that. Try loading from an external file instead, like Localization does.