[fpc-pascal] TListBox bug in LCL of Lazarus?

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Sun Dec 21 16:28:10 CET 2008

> Well, I installed and started Lazarus in the standard way so why isn't it
> using UTF-8 by default if that's the only way to store strings? Why let the
> user step into this trap? And how do I change my current code to UTF-8?

In the menu Tools --> Convert encoding of file/project

But I never used it. I would just open in a text editor which can
handle multiple encodings, like notepad++

> Thanks for the link. But why isn't it documented in the Help of TListBox? No
> word there that the strings may be UTF-8 only (and that you somehow have to
> store your code files in that coding if you use stings constants).

Because it applies to all of LCL. We would need to repeat that for all
classes from the LCL.

> Yes, of course that's correct. That's the reason I didn't use Unicode for
> Lazarus either.

You cannot not use Unicode with Lazarus. Only UTF-8 is supported,
which convers all languages, so it's enougth =)

> A quite distracting first contact with Lazarus/FPC.

There is obviously some work to be done when migrating to Unicode, but
you will be very happy if you ever need to localize your application
to Russian or chinese, because the application is already unicode
capable and can easely support those languages.

Felipe Monteiro de Carvalho

More information about the fpc-pascal mailing list