I don't know what that "dot-notation" is supposed to be and I don't have time to
test your patch. But looking it over it looks like it will handle the RedHat 6.1
case by falling through. Looks good, thanks!
Danny Backx wrote:
> Here's what I just uploaded...
>
> Danny
>
> char *
> _XmStringGetCurrentCharset(void)
> {
> char *lang, *p;
>
> if ((lang = getenv("LANG")) == NULL)
> {
> return XmFALLBACK_CHARSET;
> }
>
> if (strcmp(lang, "C") == 0 ||
> strcmp(lang, "POSIX") == 0 ||
> strcmp(lang, "ISO8859-1") == 0 ||
> strcmp(lang, "ISO-8859-1") == 0)
> {
> return XmSTRING_OS_CHARSET;
> }
>
> if ((p = strchr(lang, '.')) != NULL && *(p+1) != 0) {
> return p+1;
> }
>
> return XmFALLBACK_CHARSET;
> }
>
>
> David Rysdam wrote:
> >
> > C Hennessy wrote:
> >
> > > David Rysdam wrote:
> > > >
> > > > Disclaimer: I am neither an i18n NOR a Motif expert.
> > > Neither am I :-)
> > >
> > > > _XmStringGetCurrentCharset appears to have the wrong behavior. It
> > > > checks the env variable LANG and (with a few exceptions) returns it as
> > > > the current charset. But, as I understand it, a lang and a charset are
> > > > not interchangeable. For instance, the LANG en_US uses the charset
> > > > ISO8859--but so does the lang en_DE (or whatever German is).
> > > >
> > > > Can anyone confirm that this is a LessTif issue?
> > >
> > > Have you seen a difference in behaviour of your application that might
> > > be
> > > explained by the lesstif code ?
> > >
> > > CP
> >
> > Yes, but explaining the whole story will only confuse the issue. Instead
> > I'll explain a small part: Our code (for good or bad) calls
> > _XmStringGetCurrentCharset and does some conditional processing based on the
> > reply. On RedHat 6.0 with LessTif (including the most recent version of
> > LessTif), I get back "ISO8859-1. On RedHat 6.1, I get back "en_US". Check
> > /etc/sysconfig/i18n and /etc/profile.d/lang.*
> >
> > "Real" Motif (1.2) on both platforms (6.0 and 6.1) behaves as I expected.
> >
> > Unfortunately, I don't know enough about i18n/l10n to put in a workaround.
> > I'll have to release note this issue as a LessTif bug unless someone can
> > give me a better idea.
>
> --
> Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
> Home page : http://users.skynet.be/danny.backx
> Projects: LessTif (http://www.lesstif.org)
> Oleo (http://www.gnu.org/software/oleo/oleo.html)