bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [bug #54479] libintl_setlocale(LC_ALL, "") fails under som


From: Dapeng Gao
Subject: [bug-gettext] [bug #54479] libintl_setlocale(LC_ALL, "") fails under some locales in macOS
Date: Thu, 9 Aug 2018 09:33:29 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15

URL:
  <http://savannah.gnu.org/bugs/?54479>

                 Summary: libintl_setlocale(LC_ALL, "") fails under some
locales in macOS
                 Project: GNU gettext
            Submitted by: dpgao
            Submitted on: Thu 09 Aug 2018 01:33:27 PM UTC
                Category: End-user / runtime
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

When the system region and language in macOS are set to certain combinations
(e.g. Region = Hong Kong, Language = English), the output of the `locale'
command will appear as follows:

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

In such cases, `libintl_setlocale(LC_ALL, "")' incorrectly returns NULL
instead of setting the correct locale, as the system `setlocale' function
would do.

The attached file will reproduce the bug. Commenting out `#include
<libintl.h>' produces the correct output:

C
C/UTF-8/C/C/C/C



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 09 Aug 2018 01:33:28 PM UTC  Name: main.c  Size: 183B   By: dpgao

<http://savannah.gnu.org/bugs/download.php?file_id=44756>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54479>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]