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

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Apr 26 09:28:21 CEST 2012


Juha Manninen schrieb:
> On Wed, Apr 25, 2012 at 11:23 AM, Mattias Gaertner 
> <nc-gaertnma at netcologne.de <mailto:nc-gaertnma at netcologne.de>> wrote:
> 
>      From where are you pasting?
>     Via drag and drop or via clipboard?
>     SynEdit uses a different font than TFilenameEdit and treats some
>     characters special.
> 
> 
> Hi ik, cobines, Sven, Mattias and DoDi
> 
> I copied it through clipboard.

The Windows clipboard can have content in multiple formats. An 
application or component should ask for *Unicode* text (CF_UNICODETEXT), 
in order to get the true filename. Retrieving only CF_TEXT IMO will 
result in an Ansi string (CP_ACP), with loss of all characters outside 
the system codepage.

DoDi





More information about the Lazarus mailing list