windows: pasted numbers from calculator loose dchar

Bug #1876134 reported by Alexey Fedorov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

I use Windows 10.0.18363.628 Russian Edition (Cyrilic) and have issue with past numbers from clipboard. I use standard application Calc for operations with numbers, copy and then past in HomeBank. When my munber is, for instance, 100.34 after pasting in HomeBank it always 10034. Please fix it.

HomeBank 5.3.2 running against GTK+ 3.24.5

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

I changed my windows 1903 (18362.720) to cyrilic
launched a hb 5.3.2
and with that text, taken from the ticket: I do not reproduce.

what is the source of the text to be copied ?
can you send the text in a file that preserve source encoding ?
i suspect it is encoding related and the text in this ticket is sane.

Changed in homebank:
status: New → Incomplete
Revision history for this message
Alexey Fedorov (hubba900) wrote :

The source is Calculator application (Calculator 10.1910.0.0).

1. I open Calculator application and put "1234,56" in calculator then copy it.
2. Open HomeBank -> open account -> add -> past "1234,56" from bufer and got "123456".

I do a lot of calculation in Calculator app and always correct pasted numbers.
It's lasts few years. Long time ago its works without issue.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

ok, I will check.

It is probably related to #1826080 paste an amount with mixed dot & comma is misinterpreted of v5.2.5.

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Incomplete → New
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

It may a trailing space, I do reproduce with a space (or more than 2 char after the decimal char)
'1234,98 '

Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Low
milestone: none → 5.4.2
status: New → Confirmed
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Alexey,

Could you confirm/test that you have a 'non digit' char somewhere ?

for that 2 option:
- copy a 'valid text' form a text editor (with and without a space tab at the end
- copy your text from the calculator to an editor where you can see whitespace (eof/lf/cr) like sublimetext (or most editors)
I want to be sure that this is the problem.

Changed in homebank:
status: Confirmed → Incomplete
Revision history for this message
Alexey Fedorov (hubba900) wrote :

Maxime,

I couldn't confirm it.

Scenario 1:

1. I open Calculator and put "1111,1" to it.
2. I copy and paste "1111,1" from Calculator to HomeBank and got "11111".

Scenario 2:

1. I open Notepad++ and put "1111,1" to it.
2. I copy and paste "1111,1" from Notepad++ to HomeBank and got "11111".

When I copy "1111,1" from Calculator and past to Notepad++ (View -> Show Symbol -> Show All Characters) I see no spaces.

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Incomplete → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Hi Alezey,

Thanks for your time. I just did reproduced it.

There are some extra non digit char, as if I enter 1111,1 into the calculator and paste it to notepad, then save, and open that file with HxD, I get the following hexadecimal:

E2 80 AD 31 C2 A0 31 31 31 2C 31 E2 80 AC : ‭1 111,1‬

E2 80 AD = LEFT-TO-RIGHT OVERRIDE
C2 A0 = NO-BREAK SPACE
E2 80 AC = POP DIRECTIONAL FORMATTING

So a little pre-cleaning is mandatory before I try to guess what the decimal separator is.

for the record a bug report that mention it:
https://github.com/microsoft/calculator/issues/504

Maxime DOYEN (mdoyen)
summary: - Incorrect past numbers from clipboard
+ windows: pasted from calculator loose dchar
Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
summary: - windows: pasted from calculator loose dchar
+ windows: pasted numbers from calculator loose dchar
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
Revision history for this message
Alexey Fedorov (hubba900) wrote :

Hello Maxime,

If amount has more than 2 digits after dot - the issue appear again. For instance, 111.11 paste correctly from Calculator to HomeBank, 111.111 paste incorrectly from Calculator, but correclty from notepad.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.