Joey, > > > In order to have nl_langinfo(3) return the proper information > > > it is required to call setlocale (TYPE, "") first, which isn't > > > mentioned in the manpage of nl_langinfo(3). Please add. > > > > Joey, > > > > is nl_langinfo(3) somehow different here from a host of > > other functions whose behaviour depends on setlocale(). > > E.g., strptime(3), printf(3), etc, most of which do not > > explicitly mention the need to call setlocale()? > > Not sure about the other functions you mentioned but for nl_langinfo > you'll have to execute setlocale first. Please see the attached > test program as an example:
I've now doubt that calling setlocale() changes the result one gets from nl_langinfo. But this doesn't seem to me any different than a number of other functions that are modified by calling setlocale(). The way that this is generally documented on those pages is under SEE ALSO. That was why I asked: how is nl_langinfo() different? Cheers, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]