File names was Re: Warning: Large Babel translation

Andreas Raab andreas.raab at gmx.de
Sat Nov 15 04:43:35 UTC 2003


> Yoshiki and I actually discussed that a while ago when I 
> started getting into the m17n stuff. What I suggested was to
> introduce primitives, that return encoding and localization
> information to the image.

Brief note on terminology: "locale" and "localization" relate to the
presentation of information (language, symbols on keyboard, date format etc)
not to its representation (the way "characters" and "strings" are encoded).
What we're talking about here in terms of VM interfaces exclusively relates
to the representation.

> In Windows you can switch the locale for every programm, even 
> while it is running, so Squeak needs to have a way to retrieve 
> information about what its environment currently is.

As a matter of fact, that's precisely why I would not want to have primitive
for the purpose of getting the "locale for file names" (to be accurate: for
any representation of strings or characters for interfacing with the VM). If
we'd do this it would mean that suddenly you would need to provide for
gigazillions of various code pages (see
http://msdn.microsoft.com/library/en-us/intl/unicode_81rn.asp) in which you
may get and have to present the information.

What we really need here is some way to query the VM about what it expects
to see for "strings" and use it consistently. This may be different for
varying platforms but it would most likely be UTF8 for all windows platforms
(since it's trivial to convert UTF8 forth and back to the underlying code
page). So my feeling here is that the most important primitive would be
"please, dear VM tell me what you expect to see when I'm sending or getting
a string". Hm ... thinking about this ... I might just implement it so that
we get started into that direction. If enough people get bitten by the
inability to write their umlauts/accents this may trigger a force large
enough to get the "in-image issues" solved.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list