Bug 24875 - Bad usage of %f in output routines
Bad usage of %f in output routines
Product: Red Hat Linux
Classification: Retired
Component: dia (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
Depends On:
  Show dependency treegraph
Reported: 2001-01-24 13:55 EST by Enrico Scholz
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-12 15:27:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
diagram mentioned in the previous comment (2.02 KB, text/plain)
2001-01-29 19:05 EST, Enrico Scholz
no flags Details

  None (edit)
Description Enrico Scholz 2001-01-24 13:55:42 EST
dia uses %f in its output routines without taking care of its
locale-dependency. E.g. if you call it with different locales some numbers
can not be interpreted:

$ LC_ALL=de_DE
[... saving prefences ...]
$ LC_ALL=C dia
/home/ensc/.dia/diarc:7: error: unexpected number `100', expected number
(float)/home/ensc/.dia/diarc:7: error: unexpected character `,', expected
/home/ensc/.dia/diarc:7: error: unexpected number `0', expected keyword
/home/ensc/.dia/diarc:11: error: unexpected number `1', expected number
/home/ensc/.dia/diarc:11: error: unexpected character `,', expected keyword

That's caused because in German the comma is used instead of the period in
floating-point numbers. So a number like `100,1' is valid in German but not
in C.

I know that this report should go to the authors of dia, but because there
is a more actual version (0.86 ) out and I don't know if it  happens there
also, I am entering it here. Nevertheless RH7.1 final should not contain
this bug.
Comment 1 Enrico Scholz 2001-01-24 14:13:46 EST
Changelog indicates that the problem is solved since 0.85.
Comment 2 Preston Brown 2001-01-29 16:45:01 EST
fixed with addition of 0.86.

Havoc, where were you?
Comment 3 Havoc Pennington 2001-01-29 17:13:03 EST
I got the bug while the tree was locked, and had it marked to put in on tree
unlock, but hadn't gotten around to it yet.
Comment 4 Enrico Scholz 2001-01-29 19:03:53 EST
An locale-related error which is *not* solved in the official 0.86 can be
triggered with the following actions:

$ LC_ALL=C dia
[ create a line; save as test ]
$ LC_ALL=de_DE dia test
[ three messageboxes saying: "Error parsing point" ]

That's caused by "<point val="4,3"/>" which will be interpreted in German as
"4.3" instead of the pair [4 ; 3].

The maillists says that there are other locale-bugs solved in the CVS only.
Comment 5 Enrico Scholz 2001-01-29 19:05:01 EST
Created attachment 8459 [details]
diagram mentioned in the previous comment
Comment 6 Alexander Larsson 2001-08-15 15:28:39 EDT
Fixed in 0.88.1.

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