[Lazarus] Problem encode UTF8 with BOM in unit

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jan 25 00:33:15 CET 2012


On Wed, 25 Jan 2012 00:02:07 +0200
Zaher Dirkey <parmaja at gmail.com> wrote:

> Hi,
> 
> I created new project, then choose "File Settings -> Encoding -> UTF8 with
> BOM -> Change file"
> 
> Added new listbox1 to the form, in source code (button ) i added some items
> with my local language, this language in run time apear like "??????".
> 
> Is that a bug or i missed something?

When the compiler sees the UTF8-BOM it translates all strings
to your system encoding, which is not UTF-8. The LCL expects UTF-8
strings. Result: you see only garbage.


Mattias




More information about the Lazarus mailing list