bugGNU gettext - Bugs: bug #32004, setlocale does not work on Mac OS...

 
 

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

bug #32004: setlocale does not work on Mac OS X with custom currency set

Submitter:  Boris Dušek <dusek>
Submitted:  Wed 29 Dec 2010 01:56:38 PM UTC
   
 
Category:  End-user / runtime Severity:  3 - Normal
Item Group:  None Status:  Not a Bug
Privacy:  Public Assigned to:  ueno
Open/Closed:  Closed

Sat 09 Mar 2013 12:26:48 AM UTC, comment #1: 

Does MacPorts replaces system's gettext?  If not, it seems a problem of system's setlocale, not gettext.

Daiki Ueno <ueno>
Group administrator
Wed 29 Dec 2010 01:56:38 PM UTC, original submission:  

Hello,

I am using Mac OS X 10.6.5 and I have "English" set as my language in System Preferences > Language & Text > Language, but "Czech Republic Koruna" as currency in System Preferences > Language & Text > Formats. A call to setlocale(LC_ALL, "") results in NULL return value. perror then prints in log:

Dec 29 14:07:35 Pioneer org.freebsoft.speech-dispatcher-session[289]: setlocale: No such file or directory

I traced the speech-dispatcher process with dtrace to see what files it opens, here is the result:

  0  18561                       open:entry taskgated /usr/local/bin/speech-dispatcher
  0  18561                       open:entry speech-dispatch /opt/local/lib/libgmodule-2.0.0.dylib
  0  18561                       open:entry speech-dispatch /opt/local/lib/libintl.8.dylib
  0  18561                       open:entry speech-dispatch /opt/local/lib/libiconv.2.dylib
  0  18561                       open:entry speech-dispatch /opt/local/lib/libltdl.7.dylib
  0  18561                       open:entry speech-dispatch /dev/dtracehelper
  0  19347              open_nocancel:entry speech-dispatch /dev/urandom
  0  19347              open_nocancel:entry speech-dispatch /dev/urandom
  0  19347              open_nocancel:entry speech-dispatch /opt/local/lib/charset.alias
  0  19347              open_nocancel:entry speech-dispatch /usr/share/locale/locale.alias
  0  18561                       open:entry speech-dispatch /Users/boris/Library/Preferences/ByHost/.GlobalPreferences.001b63a34ecf.plist
  0  18561                       open:entry speech-dispatch /Users/boris/Library/Preferences/.GlobalPreferences.plist
  0  18561                       open:entry speech-dispatch /Library/Preferences/.GlobalPreferences.plist
  0  19347              open_nocancel:entry speech-dispatch /usr/share/locale/en_US@currency=CZK/LC_COLLATE

Based on the last line, it looks like setlocale fails because it does not find this directory (which really does not exist): /usr/share/locale/en_US@currency=CZK. The directory /usr/share/locale/en_US does exist.

The version of gettext I am using is 0.18.1.1 from MacPorts.

Boris Dušek <dusek>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by dusek (Submitted the item)
  •  

    There are 0 votes 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone End-user / runtime
        Assigned toNone ueno
    2013-03-09 ueno StatusNone Not a Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code