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

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Apr 25 10:23:16 CEST 2012


On Wed, 25 Apr 2012 10:04:54 +0200
Sven Barth <pascaldragon at googlemail.com> wrote:

> 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?

From where are you pasting?
Via drag and drop or via clipboard?
SynEdit uses a different font than TFilenameEdit and treats some
characters special.


> > 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.

You can not paste from a file system directly to SynEdit.
The bug is somewhere else.

Mattias




More information about the Lazarus mailing list