mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 09:00:30 +02:00
* made ToSingleByteFileSystemEncodedFileName(unicodestring) overridable by
target-specific code and implemented a JVM-compatible version git-svn-id: branches/cpstrrtl@25001 -
This commit is contained in:
parent
1da05d1553
commit
8a4b092ab9
@ -2286,11 +2286,14 @@ procedure initunicodestringmanager;
|
||||
{$endif FPC_HAS_BUILTIN_WIDESTR_MANAGER}
|
||||
|
||||
|
||||
{$ifndef FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||
{$define FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||
Begin
|
||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(Str),Result,
|
||||
DefaultFileSystemCodePage,Length(Str));
|
||||
End;
|
||||
{$endif FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||
|
@ -906,6 +906,13 @@ function StringCodePage(const S : UnicodeString): TSystemCodePage;
|
||||
result:=DefaultUnicodeCodePage;
|
||||
end;
|
||||
|
||||
{$define FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||
Begin
|
||||
result:=AnsiString(AnsistringClass.Create(Str,DefaultFileSystemCodePage));
|
||||
End;
|
||||
|
||||
|
||||
|
||||
{ helpers for converting between Windows and Java code page identifiers }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user