[Lazarus] UTF8 string compare

Vincent Snijders vsnijders at vodafonevast.nl
Sun Nov 1 22:39:46 CET 2009


Vincent Snijders schreef:
> And3mD schreef:
>> How to compare utf8 strings
>>
>> For example I have the sign "/" encoded as #47 and #192#175:
>>
>> str1:=#47; // "/"
>> str2:=#192#175; // "/"
>>
> 
> I don't think str2 is valid UTF8.
> 

It is a so-called overlong form:
See: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
http://en.wikipedia.org/wiki/UTF-8#Invalid_byte_sequences

Vincent




More information about the Lazarus mailing list