Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 24855 - Localization should not be done by fprintf()
Localization should not be done by fprintf()
Product: Red Hat Raw Hide
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-01-24 11:01 EST by Enrico Scholz
Modified: 2016-11-24 10:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-24 11:01:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-01-24 11:01:17 EST
The follwing program gives different output in different languages:

------ fp.c --------
#include <stdio.h>
#include <locale.h>

int main()
        setlocale (LC_ALL, "");
        printf("%f\n", 42.0);

$ gcc -std=c99 ~/tmp/fp.c
$ LANG=C ./a.out 
$ LANG=de_DE ./a.out 

The C99-draft says at

f,F     A  double argument representing a (finite) floating-
               point number is converted to decimal notation in the
               style  [-]ddd.ddd,

so the latter output (with a comma instead of a period)  is wrong.

This behavior breaks a lot of programs (e.g. doxygen generates TeX with
measure-units like 1,6666cm)
Comment 1 Enrico Scholz 2001-01-24 11:24:55 EST
Sorry, behavior if glibc is correct (I have missed 7.1.1/#); the other programs
are wrong so I have to write a lot of other bugreports.

Note You need to log in before you can comment on or make changes to this bug.