[Lazarus] [PATCH] Re: Might be a bug in lcl/lclproc.pas ConvertUTF8toUTF16()
Brad Campbell
brad at wasp.net.au
Sat Oct 4 11:04:38 CEST 2008
Brad Campbell wrote:
> G'day all,
>
> I've been playing with this function, and it's choking on what I believe is a valid unicode construct.
>
> UTF-8 encoding is $EF $82 $80
> UTF-16 encoding is $F080.
>
> ConvertUTF8toUTF16 returns trInvalidChar
>
> Looking at the code, it does a compare
>
> Line : 3850 if W < $D800 then // to single wide char UTF-16 char
>
> ..however $F080 is a valid UTF-16 encoding.
>
> Do we have any Unicode experts in the house?
Ok, so I dived into the Unicode documentation, and this patch should be valid. It certainly fixes my
issue anyway.
--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicode.patch
Type: text/x-diff
Size: 616 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081004/f874ce96/attachment-0002.patch>
More information about the Lazarus
mailing list