mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 11:52:18 +02:00
* Delphi-compatible overloads UTF8ToUnicodeString
This commit is contained in:
parent
54dba5738c
commit
e9c6f1c152
@ -142,6 +142,11 @@ function UTF8Decode(const s : RawByteString): UnicodeString;
|
||||
function UTF8ToString(const s : RawByteString): UnicodeString;inline;
|
||||
function UTF8ToString(const S: ShortString): unicodestring;
|
||||
function UTF8ToString(const S: PAnsiChar): unicodestring;
|
||||
// Delphi compatibility overloads...
|
||||
function UTF8ToUnicodeString(const s : RawByteString): UnicodeString;inline;
|
||||
function UTF8ToUnicodeString(const S: ShortString): unicodestring;inline;
|
||||
function UTF8ToUnicodeString(const S: PAnsiChar): unicodestring;inline;
|
||||
|
||||
{ byte and ansichar are the same on the JVM, and "array of" and "pointer to"
|
||||
are as well }
|
||||
{$ifndef CPUJVM}
|
||||
|
@ -2361,6 +2361,13 @@ begin
|
||||
Result := UTF8Decode(S);
|
||||
end;
|
||||
|
||||
function UTF8ToUnicodeString(const s : RawByteString): UnicodeString;
|
||||
begin
|
||||
Result := UTF8Decode(S);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function UTF8ToString(const S: ShortString): UnicodeString;
|
||||
Var
|
||||
rs: RawByteString;
|
||||
@ -2369,6 +2376,11 @@ begin
|
||||
Result := UTF8Decode(rs);
|
||||
end;
|
||||
|
||||
function UTF8ToUnicodeString(const S: ShortString): unicodestring;
|
||||
begin
|
||||
Result:=UTF8ToString(S);
|
||||
end;
|
||||
|
||||
function UTF8ToString(const S: PAnsiChar): UnicodeString;
|
||||
var
|
||||
rs: RawByteString;
|
||||
@ -2381,6 +2393,12 @@ begin
|
||||
Result := UTF8ToString(rs);
|
||||
end;
|
||||
|
||||
function UTF8ToUnicodeString(const S: PAnsiChar): unicodestring;
|
||||
|
||||
begin
|
||||
Result:=UTF8ToString(S);
|
||||
end;
|
||||
|
||||
{ byte and ansichar are the same on the JVM, and "array of" and "pointer to"
|
||||
are as well }
|
||||
{$ifndef CPUJVM}
|
||||
|
Loading…
Reference in New Issue
Block a user