[fpc-devel] utf8 reading

Florian Klaempfl florian at freepascal.org
Thu Mar 10 08:43:07 CET 2005


Uberto Barbini wrote:

>>>>What would be the correct solution?
>>>
>>>I am showing my ignorance of multi byte characater handling here, but
>>>I think it would be to write an escaped sequence as is currently done
>>>for wide strings. I don't think the current OutChars function is quite
>>>up to it, as utf8 characters can be 32 bits?
>>
>>As a bit of background information as to why some work may ve necessary,
>>the problem I had was with a copyright character in a string property,
>>which some version of Delphi had decided to write out as utf8.
> 
> 
> I think that the ultimate solution is to implement Unicode strings, I mean not 
> escaped Unicode, and then convert utf-8 to unicode string.
> I'm not sure how Delphi manage that, Java has Unicode string.

utf-8 is a unicode string. What do you mean with "not escaped" Unicode? Memory 
wasting utf-32?




More information about the fpc-devel mailing list