mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-09 21:49:18 +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}
|
{$endif FPC_HAS_BUILTIN_WIDESTR_MANAGER}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifndef FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||||
|
{$define FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||||
Begin
|
Begin
|
||||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(Str),Result,
|
widestringmanager.Unicode2AnsiMoveProc(punicodechar(Str),Result,
|
||||||
DefaultFileSystemCodePage,Length(Str));
|
DefaultFileSystemCodePage,Length(Str));
|
||||||
End;
|
End;
|
||||||
|
{$endif FPC_HAS_TOSINGLEBYTEFILESYSTEMENCODEDFILENAME_UNICODESTRING}
|
||||||
|
|
||||||
|
|
||||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||||
|
@ -906,6 +906,13 @@ function StringCodePage(const S : UnicodeString): TSystemCodePage;
|
|||||||
result:=DefaultUnicodeCodePage;
|
result:=DefaultUnicodeCodePage;
|
||||||
end;
|
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 }
|
{ helpers for converting between Windows and Java code page identifiers }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user