[okular] [Bug 474661] Norwegian withholding tax form - wrong calculation of percent value

2023-10-06 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=474661

--- Comment #8 from Albert Astals Cid  ---
The internet says it is a localized number

pdfium and pdf.js say "it doesn't matter, just replace the , to . and parse
that" (with the understanding that there's no thousand separators i guess)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 474661] Norwegian withholding tax form - wrong calculation of percent value

2023-10-06 Thread Volker Krause
https://bugs.kde.org/show_bug.cgi?id=474661

--- Comment #7 from Volker Krause  ---
(In reply to Albert Astals Cid from comment #6)
> Are you asking about sepStyle in AFNumber_Format?

The output part of that is clear I think (and the implementation matches that),
the question is how the input should be interpreted in case of that being a
string rather than a number. The current implementation is using the current
locale format first, and then the alternate format. Unconditionally using the
English format would probably fix this, but the current logic presumably didn't
happen by accident, so there must be more to this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 474661] Norwegian withholding tax form - wrong calculation of percent value

2023-10-06 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=474661

--- Comment #6 from Albert Astals Cid  ---
Are you asking about sepStyle in AFNumber_Format?

According to
https://acrobatusers.com/forum/javascript/setting-number-format-text-field/

sepStyle = separator style 
  0 = 1,234.56
  1 = 1234.56
  2 = 1.234,56
  3 = 1234,56

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 474661] Norwegian withholding tax form - wrong calculation of percent value

2023-10-06 Thread Volker Krause
https://bugs.kde.org/show_bug.cgi?id=474661

--- Comment #5 from Volker Krause  ---
It only triggers when the result has exactly three decimals, as only that
produces a string that can be misinterpreted as a value with a dot as group
separator instead of decimal separator.

This probably isn't even terribly hard to fix, the problem is I am not finding
the involved methods in the PDF JS API spec to know how exactly those are
supposed to behave.

-- 
You are receiving this mail because:
You are the assignee for the bug.