Character set conversions

Daniel Gibson metalcaedes at gmail.com
Tue May 31 00:03:12 PDT 2011


Am 31.05.2011 09:02, schrieb Kagamin:
> Daniel Gibson Wrote:
> 
>> In plain C (at least on Linux) you have fun locale-dependent in/output
>> as well: printf and scanf are locale dependent, so if you use sprintf
>> to generate a string you'll write into a file (or fprintf directly) with
>> one locale, reading it with scanf functions with another locale will fail.
>> Pretty fucking stupid IMHO.
> 
> Doesn't C standard specify the locale to be "C" until you set it explicitly?

At least on Linux it is usually set to whatever you specified on
installation (usually you just say "I want a german/english/whatever
installation" and the installer then sets the locales to de_DE.UTF8 or
whatever).
Applications use these settings to decide the language of their menus etc


More information about the Digitalmars-d mailing list