Author Topic: NGUI + German umlauts via WWW.text  (Read 5045 times)

Chaosgod_Espér

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
NGUI + German umlauts via WWW.text
« on: April 11, 2014, 04:07:04 PM »
hi there..

Today i tried to create a Textviewer. This Window loads a *.txt file via WWW, and sets a Label.text to the loaded one.
The code works.. but the text is shown up with the black diamond "?", instead of ßÄäÖöÜü

So i saved the file as UTF-8 TXT.. it worked..

Question now - is there a way to auto-convert those signs?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI + German umlauts via WWW.text
« Reply #1 on: April 12, 2014, 04:30:22 AM »
The font you're using must actually have the appropriate glyphs inside it.

Chaosgod_Espér

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: NGUI + German umlauts via WWW.text
« Reply #2 on: April 12, 2014, 11:53:10 AM »
they surely have. I copied them from my Windows/Fonts folder into my asset folder, and marked them to be used by the Labels in UILabel.

What i meant is:
when one of my team meber forget to use UTF-8, and uses ANSI instead.. is there a command to try to convert the Label.text to UTF-8?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI + German umlauts via WWW.text
« Reply #3 on: April 13, 2014, 12:46:16 AM »
Oh, yes... depends on the editor you're using though. In Visual Studio it's via File -> Advanced Save Options.