jakob / jakob/Postico

Confusing copy / paste behavior for localized numbers

Open
#758 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
485
Forks
8
PR merge metrics
No merged PRs in 30d

Description

If you select a region setting with `,` as decimal separator, Postico tries to convert numbers automatically to a format compatible with PostgreSQL (using `.` as decimal separator) when copy / pasting tabular data.

This should make it easier to copy data between other apps like Excel or Numbers and Postico.

This means if you copy data like this

Price (source)|
----:|
0,99|
1.199,99|

Then Postico converts it to this:

Price (converted)|
---:|
0.99|
1199.99|

However if you paste something that is already using `.` then Postico thinks this is a grouping character and removes it resulting in wrong values:

Price (source)|
---:|
0.99|
1199.99|

Price (converted)|
---:|
99|
119999|

This is most certainly not what the user wants, and we should try to detect this and at the very least show a warning if something like this happens!

(You can confirm this behavior by copy/pasting from these tables)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the copy/paste behavior with comma-decimal and dot-decimal values under a comma-decimal region setting, using the tables in the issue. Trace the tabular-number conversion entry point; done means dot-decimal values remain unchanged, comma-decimal values still convert correctly, and ambiguous conversions produce the requested warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
desktop, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.