[Lazarus] Unicode text difference between source editor and other Edit controls on Windows

Sven Barth pascaldragon at googlemail.com
Wed Apr 25 10:04:54 CEST 2012


Am 25.04.2012 00:43, schrieb ik:
> On Wed, Apr 25, 2012 at 01:26, Juha Manninen<juha.manninen62 at gmail.com>  wrote:
>> Partly related to issue
>>    21817: "FileUtil.CopyFile" would failed to work with Unicode Characters
>> filename.
>> http://bugs.freepascal.org/view.php?id=21817
>>
>> My tests failed when I copied the file name directly to source editor.
>> They succeeded when I used a FileNameEdit to select the file name.
>> Why does it happen?
>
> NTFS and FAT works in a very wrong way. They have code pages for the
> filename. so if you are using an Arabic filename for example, you must
> first know if you are using code page for Arabic (and there is more
> then one for Arabic afaik), or does it use UTF-8 or UTF-16 afaik.

I don't know about FAT, but NTFS stores filenames as UTF-16 (or UCS-2 at 
least) and thus does not need any code pages.

Regards,
Sven




More information about the Lazarus mailing list