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

 
 

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

Submitted by:  Boris Dušek <dusek>
Submitted on:  Wed 29 Dec 2010 01:56:38 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 09 Mar 2013 12:26:48 AM UTCuenoStatusNone=>Not a Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup