On Sunday 13 February 2005 19:54, Chris Cannam wrote:
> Thanks.  btw how is it that we can be so sure that the locale is "C"
> when we first start up?  That is, how do we know we don't need
> setlocale(LC_ALL, "C") in main() as well?  I presume it's documented
> somewhere that glibc will default to "C" locale unless we expressly
> tell it otherwise... is it?  or have we just got lucky so far?

It is documented in setlocale(3).

"On startup of the main program, the portable C locale is selected as default. 
A program may be made portable to all locales by calling setlocale(LC_ALL, ) 
after program initialization, by using the values returned from a 
localeconv() call for locale - dependent information, by using the multi-byte 
and wide character functions for text processing if MB_CUR_MAX > 1, and by 
using strcoll(), wcscoll() or strxfrm(), wcsxfrm() to compare strings. "

http://linuxreviews.org/man/setlocale/

Regards,
Pedro



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to