[Lazarus] StringGrid & Accented characters

Bart bartjunk64 at gmail.com
Thu Feb 2 20:46:46 CET 2017


On 2/2/17, Koenraad Lelong via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> I thought of using a StringGrid to "LoadfromCSV", modify the cells and
> then save the grid to CSV again.
> Unfortunatly, when I load the CSV, the StringGrid shows strange
> characters for the accented letters. Is a StringGrid capable of storing
> those accented letters ?

Of course it is.
Notice that Lazarus defaults strings to be UTF8-encoded.
Your file probably is not.
So you must change the encoding of the strings on the fly.
And I'm afraid you will have to do so again when saving, because I
guess also the file you are creating is expected to be in windows
(cp1252) encoding.

Bart


More information about the Lazarus mailing list