[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Locale question



I never cared much about localization but now I'm stuck with a program that
works well with all locales but has to do some output without using the
locale.

Since the output is a floating point I get e.g. 14,7 instead of 14.7 using
the german locale. But I need it to output 14.7. So far it uses printf for
output. Is there a printf-like-function that does not care about locales? Or
a format string that is locale-independant? Or is the only solution to
setlocale(LC_ALL, "C") before the printf and setlocale(LC_ALL, "de_DE")
afterwards?

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Reply to: