[DUG] Upgrading to XE - Unicode strings questions

Jolyon Smith jsmith at deltics.co.nz
Wed Nov 24 13:48:37 NZDT 2010


> Anyway for the time being, as long as the data in 
> strings is unicode, but is still Latin 8859 (ie ASCII 
> characters) I can without worrying too much iterate over 
> a string one character at a time...using length.

Yep.  But you are building an app that now supports Unicode.

If your users are able to enter data into your app, your app will now
*potentially* find itself handling Unicode data for which it was not
designed, unless you take additional steps to now prevent a user from
entering non-ASCII data in the first place.

Previously you may not have taken these steps so theoretically could have
found a user entering non-ASCII, ANSI characters too, except that in the
past you would not have been using "Unicode support" as an advertised (or
even unadvertised) feature of your app and could legitimately have told such
users not to be so dumb (in not so many words, of course :D)


This again is the danger of the "no brainer" approach with the Unicode
migration in Delphi.

By selling the idea that switching to Unicode was easy, they have just made
it more confusing in many cases, imho.


"If I can just recompile and patch up a few warnings with some boilerplate,
how come there's all this other stuff that I need to do too?  I thought
Unicode was supposed to make supporting this stuff easier."

Answer: It does.  It make supporting Unicode easier, but supporting Unicode
is not, itself, "easy".

imho



More information about the Delphi mailing list