Bug 24875 - Bad usage of %f in output routines
Summary: Bad usage of %f in output routines
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dia   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-24 18:55 UTC by Enrico Scholz
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-12 19:27:57 UTC
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-30 00:05 UTC, Enrico Scholz
no flags Details

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
/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 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.

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