Summary: | kcalc shows a 2 commas as result | ||
---|---|---|---|
Product: | [Applications] kcalc | Reporter: | Michael Braun <charlysnews> |
Component: | general | Assignee: | Klaus Niederkrüger <kniederk> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | kcalc.png |
Description
Michael Braun
2007-12-22 16:21:07 UTC
Created attachment 22651 [details]
kcalc.png
I have the same with KCalc 2.2 in KDE 4.0.1. If you change the language settings in KDE, you will see, that one "," will change too, if you change the sign for the tousands. I think, one is wrong and the other "," is wrong too, because I have the "." for separting the decimals. Don't know, from where kcalc takes this signs. I think, I know, which bug this is. The 2 commas come from 2 different things. 1 is the decimal separator and one is the separator from the tousands, but it is implemented in a wrong way, i think. If I have read the code in a right way, the separator position is set at the 3 position from right and so on. The problem is, it is counted real from right. It is not shown, if the numbers are separated with decimals. I think, the solution is at follows: - get position of decimalseparator - Insert a tousendseparator to the left side all 3 numbers until the left end of string is reached - Insert a space to the right side all 3 numbers until the right side of the string is reached. This produces the following: 1'234'567.890 123 45 If liked, this isn't hardcoded then could be taken from lokal or from the kcalc menu. This, because the sign for the tousends isn't the same as for separating the digits after a wished position. If possible, you could change the background every 3 numbers from the decimal separator at the left and right side. In this way, you don't need to take at look at the locale separator. |