[fpc-pascal] cwstrings unit and UTF8Decode()

Michael Van Canneyt michael at freepascal.org
Fri Mar 25 20:03:29 CET 2016

On Fri, 25 Mar 2016, Graeme Geldenhuys wrote:

> On 2016-03-25 12:23, Michael Van Canneyt wrote:
>> Correction, this particular function does not depend on cwstrings.
> When you say "this particular function" you are referring to the
> UTF8Decode() function correct?
> The documentation page for UTF8Decode has explicitly removed the
> reference [that it requires a widestring manager] that was there before...
> http://www.freepascal.org/docs-html/current/rtl/system/utf8decode.html
> But, it does mention that it uses the low-level Utf8ToUnicode()
> function. Now lets see that function's documentation.
> http://www.freepascal.org/docs-html/current/rtl/system/utf8tounicode.html
> And here it mentions that a widestring manager IS required for it to
> function.

This is wrong, I will correct that.

Encoding/Decoding UTF-8 to/from UTF16 is just shuffling bits.


More information about the fpc-pascal mailing list