From: Andrew Dunbar (email@example.com)
Date: Sat Oct 19 2002 - 20:41:51 EDT
--- Christian Biesinger <firstname.lastname@example.org> wrote:
> Andrew Dunbar wrote:
> > --- Christian Biesinger <email@example.com>
> > wrote:
> >>xap_UnixEncodingManager::getNative8BitEncoding to
> >>return UTF-8.
> > This is absolutely the *wrong* solution.
> > Native8BitEncoding is *specifically* *always* a
> > non-Unicode encoding.
> Hm, sure, I can change the caller as well... I
> actually intended to do that, but dom told me to
> change that function.
Encodings are hard. Even Dom finds them hard
sometimes. As do I (:
> So there are two other ways of fixing that:
> o) Change UT_wctomb's default constructor to not use
> getNative8BitEncoding but
> XAP_App::getDefaultEncoding or
> o) Change AP_DiskStringSet::setValue to pass
> to UT_wctomb's constructor.
> which one is better?
In my ancient lost mega-unicode-string-patch I got
rid of the whole default encoding in this constructor
because it's a fucked idea. The real and only
solution is to only ever create encoding converters
when you know which encodings you are converting to
and from. There should be no need for a default.
Using the default means you don't know what it should
be. If you don't know what encoding you should be
converting strings to, you shouldn't be converting
You'll just have to inspect all the code at both ends
and figure out which encoding is the right one in this
case. Sometimes it's the system default, sometimes it
is the GUI default, sometimes it is the Unicode
default, sometimes it is the 8-bit default. Sometimes
it's not any of the defaults.
I know that's a little scary but that's
internationalization for you. If you're gonna do it
you have to do it right.
I'll try to look at it myself but my tree is hideously
out of date. Hope this is some vague help.
> Fiat iustitia, pereat mundus.
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
This archive was generated by hypermail 2.1.4 : Sat Oct 19 2002 - 20:49:04 EDT