Recent

Author Topic: SOLVED: Strings, ANSI or UTF  (Read 2935 times)

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
SOLVED: Strings, ANSI or UTF
« on: January 11, 2013, 10:37:51 pm »
I want to read a File assigned as Textfile and read the following:

Artists;Elõadók

I want to copy 'Elõadók' into a stringlist or array of strings and assign it to a Label.Caption.
The problem is that it works for words without special chars, but chars like õ and ó are shown as a square []

I think it has something to do with UTF and ANSI encoding, but I can't figure out how to solve this.
« Last Edit: January 15, 2013, 11:55:20 am by Zittergie »
Be the difference that makes a difference

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Strings, ANSI or UTF
« Reply #1 on: January 11, 2013, 11:02:38 pm »
Without details of your OS and the code that yields results that are unexpected we can't do much to help you.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Strings, ANSI or UTF
« Reply #2 on: January 12, 2013, 01:17:16 am »
I want to read a File assigned as Textfile and read the following:

Artists;Elõadók

I want to copy 'Elõadók' into a stringlist or array of strings and assign it to a Label.Caption.
The problem is that it works for words without special chars, but chars like õ and ó are shown as a square []

I think it has something to do with UTF and ANSI encoding, but I can't figure out how to solve this.

Try to simply save the file as UTF8 text.
« Last Edit: January 12, 2013, 01:19:09 am by typo »

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
Re: Strings, ANSI or UTF
« Reply #3 on: January 12, 2013, 08:46:47 pm »
@ typo:  Thanks, that was a quick fix :)

Now taking some time to learn the difference between ANSI & UTF8 ...
Be the difference that makes a difference

 

TinyPortal © 2005-2018