bugGNU gettext - Bugs: bug #38162, libintl_setlocale() caches...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #38162: libintl_setlocale() caches settings under Mac OS X

Submitter:  Guido Flohr <gflohr>
Submitted:  Thu 24 Jan 2013 02:35:11 PM UTC
Votes: 1
 
Category:  End-user / runtime Severity:  3 - Normal
Item Group:  None Status:  In Progress
Privacy:  Public Assigned to:  ueno
Open/Closed:  Open

Jump to the original submission

Sun 16 Sep 2018 05:32:45 PM UTC, comment #7: 

The commit at http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=a65a37654252fd3f958aa414e42f625a55868b90 is incomplete:

1) While being necessary on all platforms except glibc, it is enabled only on macOS, native Windows, and Cygwin (see the declaration in libgnuintl.in.h).

2) The code not enabled in packages that use Gnulib's 'setlocale' module, because Gnulib does not contain the "++_nl_msg_cat_cntr;" changes and libgnuintl.in.h refrains from overriding the Gnulib version.

3) Some documentation ought to be added, in gettext.texi, at the end of node 'Triggering'.

Bruno Haible <haible>
Group administrator
Tue 25 Jun 2013 12:23:17 PM UTC, comment #6: 

Worked here as well.

Guido Flohr <gflohr>
Group Member
Tue 25 Jun 2013 07:42:31 AM UTC, comment #5: 

Anyway, pushed a bit modified version.  I did some testing on Mac OS X and it seems to work so far.

http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=a65a37654252fd3f958aa414e42f625a55868b90

Daiki Ueno <ueno>
Group administrator
Thu 07 Mar 2013 08:32:48 AM UTC, comment #4: 

Sorry, I don't have a Mac at hand and won't be able to test the fix.

Guido Flohr <gflohr>
Group Member
Wed 06 Mar 2013 05:13:55 AM UTC, comment #3: 
Daiki Ueno <ueno>
Group administrator
Tue 05 Mar 2013 11:37:56 PM UTC, comment #2: 

Sorry for the delay.  I could reproduce this with both 0.18.2.1 and 0.18.1.1.

Daiki Ueno <ueno>
Group administrator
Thu 24 Jan 2013 02:39:36 PM UTC, comment #1: 

Just for the records: You may have to change the directory in the call to bindtextdomain().

Guido Flohr <gflohr>
Group Member
Thu 24 Jan 2013 02:35:11 PM UTC, original submission:  

When I compile the attached C file under Linux and link against glibc 2.15 it behaves as expected.  It first prints the message in German, then in English:

linux $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
C
POSIX/C: Unknown system error

The same under Mac OS X with GNU gettext 0.18.2 (from mac ports) produces German output both times:

mac $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
de_DE.UTF-8
POSIX/C: Unbekannter Systemfehler

setlocale() is really libintl_setlocale() on that Mac.  When I place an "#undef setlocale" into main() and compile again, I get this:

mac $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
C/UTF-8/C/C/C/C
POSIX/C: Unbekannter Systemfehler

Guido Flohr <gflohr>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27325:  setlocale-cache-bug.c added by gflohr (786B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by egallager (macOS user possibly affected by this bug )
  • -email is unavailable- added by egallager (Voted in favor of this item)
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by gflohr (Submitted the item)
  •  

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-07 egallager Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added egallager
    2018-09-16 haible StatusFixed In Progress
        Open/ClosedClosed Open
    2016-11-27 haible CategoryNone End-user / runtime
    2013-06-25 ueno StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-03-06 ueno StatusConfirmed Ready For Test
    2013-03-05 ueno StatusNone Confirmed
        Assigned toNone ueno
    2013-01-24 gflohr Attached File- Added setlocale-cache-bug.c, #27325

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code