Use types UTF8String, PUTF8Char etc instead types string and PChar @ work with UTF8 encoded strings and chars
Original Reporter info from Mantis: Nashev
-
Reporter name:
Original Reporter info from Mantis: Nashev
- Reporter name:
Description:
It need to allow strict type checking and for improve autodocumentation ability of RTL sources.
I'm about all functions, procedures, methods and properties like:
function UnicodeToUtf8(Dest: PUTF8Char; Source: PWideChar; MaxBytes: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
function UnicodeToUtf8(Dest: PUTF8Char; MaxDestBytes: SizeUInt; Source: PWideChar; SourceChars: SizeUInt): SizeUInt;
function Utf8ToUnicode(Dest: PWideChar; Source: PUTF8Char; MaxChars: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
function Utf8ToUnicode(Dest: PWideChar; MaxDestChars: SizeUInt; Source: PUTF8Char; SourceBytes: SizeUInt): SizeUInt;
Also in Lazarus - TOpenDialog.FileName etc must be TUTF8String.
Mantis conversion info:
- Mantis ID: 20258
- Version: 2.4.4
- Fixed in version: 3.0.0
- Monitored by: » Nashev (Nashev), » etrusco (Flávio Etrusco)