mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* moved ToSingleByteFileSystemEncodedFileName() to the system unit and
export it so it can be used in all rtl units git-svn-id: branches/cpstrrtl@24960 -
This commit is contained in:
parent
e6c812a60a
commit
3694b4f003
@ -145,3 +145,6 @@ Procedure SetUnicodeStringManager (Const New : TUnicodeStringManager; Var Old: T
|
||||
function StringElementSize(const S : UnicodeString): Word; overload;
|
||||
function StringRefCount(const S : UnicodeString): SizeInt; overload;
|
||||
function StringCodePage(const S : UnicodeString): TSystemCodePage; overload;
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||
|
@ -2281,3 +2281,16 @@ procedure initunicodestringmanager;
|
||||
end;
|
||||
{$endif FPC_HAS_BUILTIN_WIDESTR_MANAGER}
|
||||
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||
Begin
|
||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(Str),Result,
|
||||
DefaultFileSystemCodePage,Length(Str));
|
||||
End;
|
||||
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||
Begin
|
||||
Result:=Str;
|
||||
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
||||
End;
|
||||
|
@ -13,18 +13,6 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: UnicodeString): RawByteString;
|
||||
Begin
|
||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(Str),Result,
|
||||
DefaultFileSystemCodePage,Length(Str));
|
||||
End;
|
||||
|
||||
|
||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||
Begin
|
||||
Result:=Str;
|
||||
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
||||
End;
|
||||
|
||||
|
||||
{$ifndef SYSUTILS_HAS_UNICODESTR_FILEUTIL_IMPL}
|
||||
|
Loading…
Reference in New Issue
Block a user