[fpc-devel] Unicode support - for the 20th time... ;-)
mschnell at lumino.de
Thu Nov 20 12:25:19 CET 2008
> For best backward compatibility, I would say Copy, Length, Pos etc
> should work by "character based" by default.
> Then introduce more
> optimised versions like ElementCopy, ElementLength, etc... Old
> programs will work out of the box, but might experience a minor speed
> penalty, until the developer has time to convert to the more optimise
> calls. Just a thought?
Agreed (but the speed penalty might be huge !) That is why I vote for a
compiler option to safe the programmer the work to modify his code.
> And to replace SomeString[x] code with a unicode safe / equivalent,
> we can implement a CharAt(str, x) method.
Here another problem might arises, as the "character" type needs to be
defined accordingly (supposedly):
ANSIString ANSIChar (1 Byte)
UCS2String UCS2Char (2 Byte)
UTF16String UTF16Char (4 Byte)/
More information about the fpc-devel