On 27 Apr 2000, Alexandre Julliard wrote:

> Patrik Stridvall <[EMAIL PROTECTED]> writes:
> 
> > Do you consider an Windows _application_ that can be compiled as both ASCII
> > and Unicode as less maintainable?
> 
> Yes; it all looks very nice in theory, but when you try to deal with
> real life problems, like file I/O for instance, this TCHAR magic is a
> pain, and you end up with #ifdef UNICODE all over the place.

In some cases, a truly hideous kludge... (ISTR some nasty problems with a
user account importer I wrote a few years ago, where an API call had
changed interface, and started treating the passwords as Unicode. It
worked fine in testing on my machine, but then broke on the school's
server, which had an earlier SP on... Yeugh!)

> > > Embedded systems may want Unicode too (CE is mostly Unicode AFAIK).
> > 
> > Sure you can run Unicode only if you wish.
> 
> No; most typical apps need a mix of the two, because you want Unicode
> when dealing with the user interface so that you can support multiple
> languages, but you don't want to convert your whole app to use Unicode
> internally where it's not necessary.

Quite. After all, if you go Unicode-only, including your file formats,
then the new format doubles the size of every .DOC file by filling it with
\0 as every other character. Surely NOONE is THAT stupid? :-)

For apps, Alexandre's suggestion seems like a pretty good strategy. For
libraries (and Wine), though, presumably we have to avoid converting
"down" to ASCII, since this (potentially) loses data?


James.

Reply via email to