Bug 24875

Summary: Bad usage of %f in output routines
Product: [Retired] Red Hat Linux Reporter: Enrico Scholz <rh-bugzilla>
Component: diaAssignee: Alexander Larsson <alexl>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: pbrown
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-12 19:27:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
diagram mentioned in the previous comment none

Description Enrico Scholz 2001-01-24 18:55:42 UTC
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
keyword
/home/ensc/.dia/diarc:7: error: unexpected number `0', expected keyword
/home/ensc/.dia/diarc:11: error: unexpected number `1', expected number
(float)
/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 19:13:46 UTC
Changelog indicates that the problem is solved since 0.85.

Comment 2 Preston Brown 2001-01-29 21:45:01 UTC
fixed with addition of 0.86.

Havoc, where were you?

Comment 3 Havoc Pennington 2001-01-29 22:13:03 UTC
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-30 00:03:53 UTC
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-30 00:05:01 UTC
Created attachment 8459 [details]
diagram mentioned in the previous comment

Comment 6 Alexander Larsson 2001-08-15 19:28:39 UTC
Fixed in 0.88.1.