25.01.2012 2:02, Zaher Dirkey пишет:
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 BOM or {$codepage utf8} directive is present compiler converts your strings to widestrings. So you have two options

1. Add {$codepage 8859-1} directive at the start of the .pas file.

2. Use UTF8Encode() function, e.g.

ListBox1.Items.Add(UTF8Encode('محاسبة عادية'));

--
Best regards,
 Maxim Ganetsky                  mailto:[email protected]

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to