Converts an UTF-8 encoded string to msestring (UCS2)
Source position: msestrings.pas line 610
function utf8tostring( |
const value: pchar; |
const alength: Integer; |
const options: utfoptionsty = [] |
):msestring; |
const value: pchar; |
const options: utfoptionsty = [] |
):msestring; |
const value: lstringty; |
const options: utfoptionsty = [] |
):msestring; |
const value: utf8string; |
const options: utfoptionsty = [] |
):msestring; |
Converts an UTF-8 encoded string to msestring (UCS2).
Beware of the utf8string overload: if an ansistring is passed, the compiler first converts it silently from the system code page to UTF-8, which damages the text when the bytes are already UTF-8 and the system code page is not (e.g. Windows, or LANG=C). Use utf8tostringansi in that case. In a unit using msestrings, an unqualified utf8tostring refers to this function; write system.utf8tostring for the FPC one.