Closed Bug 3904 Opened 26 years ago Closed 25 years ago

Locale- No GetPlatformLocale for linux

Categories

(MailNews Core :: Internationalization, defect, P3)

Other
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: nhottanscp, Assigned: tague)

Details

Need a mapping from XP locale to platform specific locale and charset name.
Target Milestone: M4
mark this m4
Status: NEW → ASSIGNED
Summary: No GetPlatformLocale for linux → Locale- No GetPlatformLocale for linux
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
done.

Checked in functionality tonight which supports mapping XPLocale->Linux style
(LL_CC) Locale string.  It doesn't currently deal with multiple encodings for
locales.
Can this also support locale to charset name mapping or it's someone else's
task?
E.g. en_US -> iso-8859-1
I need this for the conversion in order to talk to non unicode API.
hmmm...lets talk later about what needs to be done as far as locale implying a
character set.  It might be it's own componet or something, but I'm sure we can
get this implemented.
Status: RESOLVED → VERIFIED
** Checked with 4/7/99 source for nsLocaleTest.cpp **

I don't know any direct way to test GetPlatformLocale. See:

mozilla/intl/locale/src/unix/nsPosixLocale.cpp

The Unix version of LocaleSelfTest includes self-test (option -v)
for selected lcoales. The tests return POSIX style
locale names, e.g. en_GB, correctly for the following:

locale = en-US  --> POSIX-style en_US
locale = en-GB  --> POSIX-style en_GB
locale = fr-FR  --> POSIX-style fr_FR
locale = de-DE  --> POSIX-style de_DE
locale = ja-JP  --> POSIX-style ja_JP

I'll mark this fix verified based on these results.

Notes to tague@netscape.com & nhotta@netscape.com:

1. When you check in changes, please specify what files were modified. It
   will help check on the results immensely!
2. nsLocaleTest -- the Unix version core dumps when run without
                   any argument during nsCollation test, or when
                   run with '-col' option.
>1. When you check in changes, please specify what files were modified. It
>   will help check on the results immensely!
I think Tague checked this in for M4. If you're talking about the unit test, I
should wait until the tree is open for M5.
>2. nsLocaleTest -- the Unix version core dumps when run without
>                   any argument during nsCollation test, or when
>                   run with '-col' option.
I think there is a confusion. nsLocaleTest it Tague's unit test and I don't
think it deals with collation (or you mean LocaleSelfTest on unix?). Again the
unit test change won't be checked in until the tree opens for M5.

Also it is more clear to file a separate bug for the unit test and mention the
bug number here.
About point #1, it's more of a general comment. I would like to
see names of files affected. So would others who might be reading
this bug report.

You're right about point #2. This is not tague's problem. I meant
to mention the Unix version of LocaleSelfTest.
It is mentioned here only as a side note. It will be filed as a separate
bug.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.