lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>> File names, et al in Win32 are all pure Unicode and, to keep the WinCE
size
>> down, Microsoft, in their near-infinite wisdom and judgement, decided to
do
>> away with the <foo>A versions of the APIs which would accept ASCII (or
>> UTF-8, presumably) names and convert to Unicode behind the scenes.  This
>> means that if I want to open a file, I have to manually convert the
string
>> (UTF-8 or ASCII, same difference in this case) to Unicode before using
it.

> Forgive me for being dense, for I know very little about unicode.  Doesn't
> this mean that all strings in WinCE take up twice as much room as they
would
> normally require?  If so, in normal use, is it possible that they actually
> waste more memory than they save by removing the ASCII compatible calls?
> (I'm no Windows person, either)

Yes, quite possibly.  The trade-off is, however, that Windows CE is
trivially internationalised.  If you want internationalisation and have
chosen Unicode as your mechanism to do so, removing the ASCII calls is the
only way left to save memory.  (And keep in mind that the Win32 has
hundreds, if not thousands, of API calls.  Throwing away half of them
translates to a significant savings.)

I guess they could have used UTF-8 as their internationalisation mechanism,
but UTF-8 holds significant processor overhead, some problems in picking
specific characters in a string and the problem that in non-Latin alphabets
it actually takes up more space than Unicode.

--
Michael T. Richter
"Be seeing you."