[Lazarus] Converting all code to use UnicodeString

Marcos Douglas B. Santos md at delfire.net
Tue Sep 26 21:51:33 CEST 2017


On Tue, Sep 26, 2017 at 6:31 AM, Juha Manninen via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> On Tue, Sep 26, 2017 at 4:37 AM, Marcos Douglas B. Santos via Lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> But according with this table, I shouldn't do that because so many
>> problems could happen.
>> http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Without_.7B.24codepage_utf8.7D_or_compilerswitch_-FcUTF8
>
> No. It works when assigning to String and that is what matters.

I understood that I can use like this:
const
  VALUE: string = 'áéíóú';

Not like this:
const
  VALUE = 'áéíóú';

Right?
But this is not compile:
const
  V1: string = 'a';
  V2: string = V1 + 'b';

>>> The solution is to NOT use Windows codepages.
>>> ...
>> So, no problems here and the page is outdated. OK.
>
> The page is correct but your code and/or data is outdated if it uses
> the Windows codepage encoding. :)
> Well, honestly, why do you still use it?
> Unicode has been around for decades. It solved all the horrible
> problems inherent to locale dependent codepages. Windows has supported
> full Unicode for ~18 years.
> Maybe there still is a valid reason to use codepages but I don't know
> what it is.

I don't use it.

Regards,
Marcos Douglas


More information about the Lazarus mailing list