Bug 480885 - [hi_IN] [mai_IN] setlocale failed to set hi_IN as well as mai_IN languages.
[hi_IN] [mai_IN] setlocale failed to set hi_IN as well as mai_IN languages.
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Parag Nemade
Fedora Extras Quality Assurance
Depends On: 466912
Blocks: F11Blocker/F11FinalBlocker
  Show dependency treegraph
Reported: 2009-01-20 23:32 EST by Parag Nemade
Modified: 2009-02-08 22:51 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-08 22:51:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
anaconda failure log for maithili language selection (2.37 KB, text/plain)
2009-01-20 23:32 EST, Parag Nemade
no flags Details

  None (edit)
Description Parag Nemade 2009-01-20 23:32:14 EST
Created attachment 329541 [details]
anaconda failure log for maithili language selection

Description of problem:
anaconda does not work with 3 letter locale like mai,Ilo
This is with refernece to patch submitted in bug473209 to enable mai(Maithili) language in anaconda.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.just start anaconda from gnome-terminal as root user
2. select Maithili and click on next
Actual results:
backtrace with locale.Error: unsupported locale setting

Expected results:
should support locale and start anaconda in mai language.

Additional info:
This is not happening with python 2.5 in F10 and in F10 I can use Maithili
Comment 1 Ignacio Vazquez-Abrams 2009-01-20 23:54:25 EST
From Python-2.6/Modules/_localemodule.c, lines 160 through 196:

static PyObject*
PyLocale_setlocale(PyObject* self, PyObject* args)
    int category;
    char *locale = NULL, *result;
    PyObject *result_object;

    if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale))
        return NULL;

    if (locale) {
        /* set locale */
        result = setlocale(category, locale);
        if (!result) {
            /* operation failed, no setting was changed */
            PyErr_SetString(Error, "unsupported locale setting");
            return NULL;
        result_object = PyString_FromString(result);
        if (!result_object)
            return NULL;
        /* record changes to LC_CTYPE */
        if (category == LC_CTYPE || category == LC_ALL)
        /* things that got wrong up to here are ignored */
    } else {
        /* get locale */
        result = setlocale(category, NULL);
        if (!result) {
            PyErr_SetString(Error, "locale query failed");
            return NULL;
        result_object = PyString_FromString(result);
    return result_object;

This is just Python 2.6 reporting a failure in glibc at line 172.
Comment 2 Parag Nemade 2009-01-21 00:24:24 EST
let me move this bug to glibc then.
Comment 3 Parag Nemade 2009-01-27 02:47:51 EST
Okay So I got some more in depth information about this bug. A simple setlocale program fails to set for hi_IN as well as mai_IN locale but setlocale can set any other indic language.

When I check for output of "locale -a| grep hi" i got nothing on my rawhide machine. same for mai language. But for other indic languages translations as well as setlocale() works fine.
Comment 4 Parag Nemade 2009-01-27 03:20:17 EST
Just checked build.log of glibc-2.9.90-2.fc11 =>
and found
Adding hi_IN
Adding hne_IN
incomplete set of locale files in "hi_IN"
incomplete set of locale files in "hne_IN"
so something gone wrong while adding hne_IN locale in usptream.
Comment 5 Parag Nemade 2009-01-27 03:27:25 EST
Just found that actually hne_IN was already successfully present in previous glibc build. So this now looks upstream issue.

Ohh found some more messages in build.log for other indic languages
incomplete set of locale files in "as_IN.utf8"
incomplete set of locale files in "bn_BD"
incomplete set of locale files in "mai_IN"

Sorry for not writing all my observations in single comment.
Comment 6 Parag Nemade 2009-01-27 03:50:22 EST
Reported upstream now.
Comment 7 Parag Nemade 2009-01-28 00:00:23 EST
This bug is appearing because of modification done in hi_IN locale which is fix for bug 466912. Once bug 466912 fix issues in hi_IN this bug will get fixed automatically.
Comment 8 Parag Nemade 2009-02-08 22:51:20 EST
This looks fixed now with update to glibc-2.9.90-3 in rawhide.

Note You need to log in before you can comment on or make changes to this bug.