Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-04

Unicode Again

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee Jenkins

I'm trying to wrap my head around Unicode still. I compile my IDE 0.9.25 with Unicode support according to this:
http://wiki.freepascal.org/LCL_Unicode_Support#Compiling_LCL-Win32_with_Unicode

I've tried both of the following:

ListBox1.Items.Add(AnsiToUtf8(DateTimeToStr(now)));
ListBox1.Items.Add(DateTimeToStr(now));

Both results are the same. Is this because the results that are returned are part of the lower portion < 128 that there is no difference.

I want my next application to be able to display other languages so I'm just trying to get a header start now on figuring out exactly what I must do (now) to ensure that my sources are compliant later on.

Thanks for your patience.

Warm Regards, Lee

Reply by email

Felipe Monteiro de Carvalho
to Lee Jenkins
ListBox1.Items.Add(AnsiToUtf8(DateTimeToStr(now)));

This is the safest choice.

Both results are the same. Is this because the results that are returned are part of the lower portion < 128 that there is no difference.

Yes, that's correct. If only ASCII chars are used, then utf-8 = ansi always

Felipe Monteiro de Carvalho

Reply by email