[fpc-devel] Re: enumerators
Michael Schnell
mschnell at lumino.de
Mon Nov 15 09:54:13 CET 2010
On 11/14/2010 10:12 PM, Hans-Peter Diettrich wrote:
> With regards to UTF-8 (or other MBCS) strings, what does Length(s)
> return in these cases? IMO other functions have to be used for the
> determination of the true character count (as opposed to the char=byte
> count).
Of course its possible without a code table (and maybe even desirable)
to calculate the length of an UTF-8 String in terms of Unicode
Characters rather than in terms of bytes. But to do this the compiler
would need to know if in this place the string is an UTF8String or an
ANSIString. I don't know if those different types are predefined.
Maybe we will need to wait for this comfort until the "New Derlphi
String" implementation (right now only existing in the svn) is up to speed.
-.Michael
More information about the fpc-devel
mailing list