-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: Support non-breaking spaces in numeric strings (OFBIZ-13168) (#…
…847) In forms, numeric fields are represented by an input with type "text", which allows user to enter/paste all characters, including non-breaking spaces ('\u00A0', '\u202F', '\u2007'), like "29 000" (the space is \u202F). More specifically, a user can copy/paste a string from an external tool which uses non-breaking spaces as a thousands separator, and expect that a visually correct string will be correctly interpreted by OFBiz. OFBiz uses java.text.NumberFormat::parse method, which does not support non-breaking spaces : characters after this kind of spaces are simply ignored, and "29 000" becomes "29". This PR only illustrates the problem and a way of fixing it, I'm not sure that this would be a good solution (maybe handle submitted strings elsewhere ? maybe more upstream ?). Thanks: Nereide team
- Loading branch information
1 parent
74ca62b
commit f41e0a3
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters