[Lazarus] Problem encode UTF8 with BOM in unit

Zaher Dirkey parmaja at gmail.com
Wed Jan 25 01:04:09 CET 2012


On Wed, Jan 25, 2012 at 1:33 AM, Mattias Gaertner <nc-gaertnma at netcologne.de
> wrote:

> 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
>
>
How can i resolve this problem, because i share this unit with Delphi 2007,
Delphi 2007 not understand UTF8 *without *BOM

Thanks

Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120125/4a6dc04e/attachment-0003.html>


More information about the Lazarus mailing list