Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fr:number: incorrect formatting with pseudo-decimal point #4026

Closed
ebruchez opened this issue Apr 12, 2019 · 6 comments

Comments

Projects
1 participant
@ebruchez
Copy link
Collaborator

commented Apr 12, 2019

  • set "," as decimal separator and no grouping separator (see #4024)
  • enter "1234.56"
  • this stores "1234≡56"
  • but the UI shows "1234,56"

+1 from customer

@ebruchez ebruchez self-assigned this Apr 12, 2019

@ebruchez ebruchez added this to To review in Orbeon Forms 2019.1 via automation Apr 12, 2019

@ebruchez ebruchez added this to To do in Orbeon Forms 2018.2.3 via automation Apr 12, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 6, 2019

See also #4024, where I had this comment:

  • What about entering "1,345" when no separator? Currently, it's an error. We could consider removing unknown characters, or a subset such as punctuation, or even common separators.
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 6, 2019

The separators actually in use in the world are:

  • none
  • one space
  • ,
  • .
  • '
  • others?
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 6, 2019

Also consider stripping: $ and other currency symbols.

@ebruchez ebruchez moved this from To do to In progress in Orbeon Forms 2018.2.3 May 6, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 6, 2019

This Wikipedia page covers the following separators:

Used with Western Arabic numerals (0123456789):

  • U+0020 SPACE (HTML )
  • U+0027 ' APOSTROPHE (HTML ' · ')
  • U+002C , COMMA (HTML ,)
  • U+002E . FULL STOP (HTML .)
  • U+00B7 · MIDDLE DOT (HTML · · ·)
  • U+2009   THIN SPACE (HTML   ·  )
  • U+202F   NARROW NO-BREAK SPACE (HTML  )
  • U+02D9 ˙ DOT ABOVE (HTML ˙)

Used with Eastern Arabic numerals (٠١٢٣٤٥٦٧٨٩):

  • U+066B ٫ ARABIC DECIMAL SEPARATOR (HTML ٫)
  • U+066C ٬ ARABIC THOUSANDS SEPARATOR (HTML ٬)

Used with keyboards:

  • U+2396 ⎖ DECIMAL SEPARATOR KEY SYMBOL (HTML ⎖) (resembles an apostrophe)

For input, covering the following in a dropdown would be enough for now:

  • U+0020 SPACE (HTML )
  • U+0027 ' APOSTROPHE (HTML ' · ')
  • U+002C , COMMA (HTML ,)
  • U+002E . FULL STOP (HTML .)
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 7, 2019

For #4024, I now use dropdowns (with an option for "other") for the decimal and grouping separators.

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented May 15, 2019

The original issue happens because when reading 1234≡56 from storage, we replace with a ., but then we also replace the . with the actual separator, which is unintended.

@ebruchez ebruchez closed this in d1f7567 May 15, 2019

ebruchez added a commit that referenced this issue May 15, 2019

Orbeon Forms 2019.1 automation moved this from To review to Done May 15, 2019

Orbeon Forms 2018.2.3 automation moved this from In progress to Done May 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.