mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 13:19:21 +02:00
FileUtil: inline ExpandFileNameUTF8 as LazFileUtils.ExpandFileNameUTF8,
which has better handling of unicode characters on Windows. (One step in the moving of UTF8 related filefunctions to LazFileUtils) git-svn-id: trunk@41038 -
This commit is contained in:
parent
d9e1aa876f
commit
a031882b1a
@ -70,7 +70,13 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
// For ExpandFileNameUTF8 and ExpandUNCFileNameUTF8
|
||||
|
||||
function ExpandFileNameUTF8(const FileName: string): string;
|
||||
begin
|
||||
Result := LazFileUtils.ExpandFileNameUtf8(Filename);
|
||||
end;
|
||||
|
||||
// ToDo: For ExpandUNCFileNameUTF8
|
||||
//
|
||||
// Don't convert to and from Sys, because this RTL routines
|
||||
// simply work in simple string operations, without calling native
|
||||
@ -79,10 +85,7 @@ end;
|
||||
// The Ansi conversion just ruins Unicode strings
|
||||
//
|
||||
// See bug http://bugs.freepascal.org/view.php?id=20229
|
||||
function ExpandFileNameUTF8(const FileName: string): string;
|
||||
begin
|
||||
Result:=SysUtils.ExpandFileName(Filename);
|
||||
end;
|
||||
// It needs fixing like we did for LazFileUtils.ExpandFileNameUtf8(Filename) on Windows
|
||||
|
||||
function ExpandUNCFileNameUTF8(const FileName: string): string;
|
||||
begin
|
||||
|
@ -25,7 +25,7 @@ unit FileUtil;
|
||||
interface
|
||||
|
||||
uses
|
||||
SysConst, Classes, SysUtils, Masks, LazUtilsStrConsts, lazutf8;
|
||||
SysConst, Classes, SysUtils, Masks, LazUtilsStrConsts, lazutf8, LazFileUtils;
|
||||
|
||||
{$if defined(Windows) or defined(darwin)}
|
||||
{$define CaseInsensitiveFilenames}
|
||||
@ -216,7 +216,7 @@ function UTF8ToConsole(const s: string): string;// converts UTF8 string to conso
|
||||
function FileExistsUTF8(const Filename: string): boolean;
|
||||
function FileAgeUTF8(const FileName: string): Longint;
|
||||
function DirectoryExistsUTF8(const Directory: string): Boolean;
|
||||
function ExpandFileNameUTF8(const FileName: string): string;
|
||||
function ExpandFileNameUTF8(const FileName: string): string; inline;
|
||||
function ExpandUNCFileNameUTF8(const FileName: string): string;
|
||||
function ExtractShortPathNameUTF8(Const FileName : String) : String;
|
||||
function FindFirstUTF8(const Path: string; Attr: Longint; out Rslt: TSearchRec): Longint;
|
||||
|
Loading…
Reference in New Issue
Block a user