[fpc-devel] RTL: file system functions results encoding

Michael Van Canneyt michael at freepascal.org
Mon Mar 10 17:37:09 CET 2008



On Mon, 10 Mar 2008, Vladimir wrote:

> Hi,
> 
> Working with SysUtils.FindFirst and FindNext routines I found that the encoding
> of resulting TSearchRec record fields differs across platforms.
> Under Windows it seems to be ANSI and under Linux it seems to be UTF-8.
> The problem is that application expects the same encoding everywhere.
> Is there any way to determine the resulting encoding to convert fields
> to the encoding I need?

In short: no. But you shouldn't have to ?
The result depends on the system calls used by the FindFirst/FindNext calls,
and since the system calls are by definition system dependent, so you know
on which platform what encoding is used.

Michael.



More information about the fpc-devel mailing list