[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-patches
Subject:    Re: [libi18n, Unix] fix display of win-cp-1250 encoded pages in Unix
From:       Erik van der Poel <erik () netscape ! com>
Date:       1998-04-18 1:05:39
[Download RAW message or body]

Tomas Brodsky wrote:

> However, I've encountered another bug: all the text in forms
> (button labels, text in input areas and combo-boxes) gets displayed
> in Latin1 regardless of the document encoding.

Which OS are you using? Which locale are you using? Does your OS have any locales?

> }
> else
> {
> -               cs = CS_LATIN1;
> +               INTL_CharSetInfo csi = LO_GetDocumentCharacterSetInfo (context);
> +               cs = INTL_GetCSIWinCSID (csi);
> +
> fontOrFontSet = fe_LoadFont(context, &cs, familyName,
> 0 /* no pointsize */,
> sizeNum, fontmask);

This won't work when WinCSID is a multibyte charset, because the following line in \
the source says:

*type = XmFONT_IS_FONT;

but fe_LoadFont does not load a single font when cs is multibyte; it loads a font \
"group" (my equivalent of Xlib's font "set" and Motif's font "list").

If you want your hack to work, you can try a slightly different hack:

cs = INTL_GetCSIWinCSID(csi);
if (cs & MULTIBYTE)
{
    cs = CS_LATIN1;
}

I don't know if keyboard input will work correctly in HTML form text widgets if you \
have hacked the font in that way. Try it!

Erik van der Poel
Client I18N


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic