C localization functions: Difference between revisions

Content deleted Content added
Example: Rewritten to be more appropriate to the subject in C from C++, make use of the unnecessary stdlib.h include, and setlocale() so the currency symbol is shown portably.
Removed extra quotes
Line 20:
main(void)
{
/* Locale is set to "C" before this. This call sets it
/* From setlocale(3):
** On startup ofto the main"current program,locale" theby portablereading "C"""environment localevariables: */
/* From setlocale(3LC_ALL, ""):;
** is selected as default. A program may be made portable to
** all locales by calling setlocale(LC_ALL, """""") ... */
setlocale(LC_ALL, """""");
 
const struct lconv * const currentlocale = localeconv();