diff --git a/components/lazutils/fileutil.pas b/components/lazutils/fileutil.pas index f6e9006efd..2882badbbc 100644 --- a/components/lazutils/fileutil.pas +++ b/components/lazutils/fileutil.pas @@ -214,9 +214,9 @@ function SetCurrentDirUTF8(const NewDir: String): Boolean; function CreateDirUTF8(const NewDir: String): Boolean; function RemoveDirUTF8(const Dir: String): Boolean; function ForceDirectoriesUTF8(const Dir: string): Boolean; -function FileOpenUTF8(Const FileName : utf8string; Mode : Integer) : THandle; -function FileCreateUTF8(Const FileName : utf8String) : THandle; overload; -function FileCreateUTF8(Const FileName : utf8String; Rights: Cardinal) : THandle; overload; +function FileOpenUTF8(Const FileName : string; Mode : Integer) : THandle; +function FileCreateUTF8(Const FileName : string) : THandle; overload; +function FileCreateUTF8(Const FileName : string; Rights: Cardinal) : THandle; overload; // environment function ParamStrUTF8(Param: Integer): string; diff --git a/components/lazutils/lazutf16.pas b/components/lazutils/lazutf16.pas index 3535332dc5..bdc4e2f6b3 100644 --- a/components/lazutils/lazutf16.pas +++ b/components/lazutils/lazutf16.pas @@ -41,7 +41,7 @@ function UTF16CharacterToUnicode(p: PWideChar; out CharLen: integer): Cardinal; function UnicodeToUTF16(u: cardinal): widestring; function UnicodeLowercase(u: cardinal): cardinal; -function UTF8LowerCaseViaTables(const s: utf8string): utf8string; +function UTF8LowerCaseViaTables(const s: string): string; implementation @@ -896,7 +896,7 @@ begin end; end; -function UTF8LowerCaseViaTables(const s: utf8string): utf8string; +function UTF8LowerCaseViaTables(const s: string): string; var i: PtrInt; CharLen: integer; diff --git a/components/lazutils/lazutf8.pas b/components/lazutils/lazutf8.pas index a16e0b7e97..f8598f307a 100644 --- a/components/lazutils/lazutf8.pas +++ b/components/lazutils/lazutf8.pas @@ -61,8 +61,8 @@ function UTF8Copy(const s: string; StartCharIndex, CharCount: PtrInt): string; procedure UTF8Delete(var s: String; StartCharIndex, CharCount: PtrInt); procedure UTF8Insert(const source: String; var s: string; StartCharIndex: PtrInt); -function UTF8LowerCase(const AInStr: utf8string; ALanguage: utf8string=''): utf8string; -function UTF8UpperCase(const AInStr: utf8string; ALanguage: utf8string=''): utf8string; +function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string; +function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string; function FindInvalidUTF8Character(p: PChar; Count: PtrInt; StopOnNonASCII: Boolean = false): PtrInt; function ValidUTF8String(const s: String): String; @@ -71,8 +71,8 @@ procedure AssignUTF8ListToAnsi(UTF8List, AnsiList: TStrings); //compare functions -function UTF8CompareStr(const S1, S2: utf8string): Integer; -function UTF8CompareText(const S1, S2: utf8string): Integer; +function UTF8CompareStr(const S1, S2: string): Integer; +function UTF8CompareText(const S1, S2: string): Integer; type TConvertResult = (trNoError, trNullSrc, trNullDest, trDestExhausted, @@ -668,7 +668,7 @@ end; The columns in the file UnicodeData.txt are explained here: http://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html#Case Mappings } -function UTF8LowerCase(const AInStr: utf8string; ALanguage: utf8string=''): utf8string; +function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string; var CounterDiff: PtrInt; InStr, InStrEnd, OutStr: PChar; @@ -1810,7 +1810,7 @@ end; The columns in the file UnicodeData.txt are explained here: http://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html#Case Mappings } -function UTF8UpperCase(const AInStr: utf8string; ALanguage: utf8string=''): utf8string; +function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string; var i, InCounter, OutCounter: PtrInt; OutStr: PChar; @@ -2270,7 +2270,7 @@ end; Note: Use this function instead of AnsiCompareStr. This function guarantees proper collation on all supported platforms. ------------------------------------------------------------------------------} -function UTF8CompareStr(const S1, S2: utf8string): Integer; +function UTF8CompareStr(const S1, S2: string): Integer; begin Result := SysUtils.CompareStr(S1, S2); end; @@ -2283,9 +2283,9 @@ end; Note: Use this function instead of AnsiCompareText. This function guarantees proper collation on all supported platforms. ------------------------------------------------------------------------------} -function UTF8CompareText(const S1, S2: utf8string): Integer; +function UTF8CompareText(const S1, S2: string): Integer; var - S1Lower, S2Lower: utf8string; + S1Lower, S2Lower: string; begin S1Lower := UTF8LowerCase(S1); S2Lower := UTF8LowerCase(S2); diff --git a/components/lazutils/unixfileutil.inc b/components/lazutils/unixfileutil.inc index 24a231a880..0332f33bea 100644 --- a/components/lazutils/unixfileutil.inc +++ b/components/lazutils/unixfileutil.inc @@ -377,17 +377,17 @@ begin Result:=SysUtils.DirectoryExists(UTF8ToSys(Directory)); end; -function FileOpenUTF8(Const FileName : utf8string; Mode : Integer) : THandle; +function FileOpenUTF8(Const FileName : string; Mode : Integer) : THandle; begin Result := SysUtils.FileOpen(FileName, Mode); end; -function FileCreateUTF8(Const FileName : utf8string) : THandle; +function FileCreateUTF8(Const FileName : string) : THandle; begin Result := SysUtils.FileCreate(FileName); end; -function FileCreateUTF8(Const FileName : utf8String; Rights: Cardinal) : THandle; +function FileCreateUTF8(Const FileName : string; Rights: Cardinal) : THandle; begin Result := SysUtils.FileCreate(FileName, Rights); end; diff --git a/components/lazutils/winfileutil.inc b/components/lazutils/winfileutil.inc index e574b0c490..0764f832aa 100644 --- a/components/lazutils/winfileutil.inc +++ b/components/lazutils/winfileutil.inc @@ -588,7 +588,7 @@ begin Result:=False; end; -function FileOpenUTF8(Const FileName : utf8string; Mode : Integer) : THandle; +function FileOpenUTF8(Const FileName : string; Mode : Integer) : THandle; const AccessMode: array[0..2] of Cardinal = ( GENERIC_READ, @@ -607,13 +607,13 @@ begin //if fail api return feInvalidHandle (INVALIDE_HANDLE=feInvalidHandle=-1) end; -function FileCreateUTF8(Const FileName : utf8string) : THandle; +function FileCreateUTF8(Const FileName : string) : THandle; begin Result := CreateFileW(PWideChar(UTF8Decode(FileName)), GENERIC_READ or GENERIC_WRITE, 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); end; -function FileCreateUTF8(Const FileName : utf8String; Rights: Cardinal) : THandle; +function FileCreateUTF8(Const FileName : string; Rights: Cardinal) : THandle; begin Result := CreateFileW(PWideChar(UTF8Decode(FileName)), GENERIC_READ or GENERIC_WRITE, 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);