[Lazarus] Might be a bug in lcl/lclproc.pas ConvertUTF8toUTF16()

Vincent Snijders vsnijders at vodafonevast.nl
Sat Oct 4 10:54:42 CEST 2008


Brad Campbell schreef:
> 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.
> 

What Lazarus version do you use?
I cannot fin the line you mention. Maybe it has been fixed already in 
the SVN version.

Vincent



More information about the Lazarus mailing list