Recognizers-Text icon indicating copy to clipboard operation
Recognizers-Text copied to clipboard

[es-MX Number] Inconsistency in the output resolution for the decimal point

Open nawanas opened this issue 4 years ago • 1 comments

The resolution for numbers in the es-MX comes with a comma, which is different then how it is interpreted in es-ES and en-US. It should be agnostic to the culture and prouce a consistent resolution

To Reproduce Sending a query to the recognizer to resolve that has a decimal point like $3.21 would return the following

withUnitRecognizer.GetCurrencyModel("es-es").Parse("$3,21")[0].Resolution["value"]; => “3,21” withoutUnitRecognizer.GetNumberModel("es-es").Parse("$3,21")[0].Resolution["value"]; => “3,21”

withUnitRecognizer.GetCurrencyModel("es-mx").Parse("$3,21")[0].Resolution["value"]; => “3,21” withoutUnitRecognizer.GetNumberModel("es-mx").Parse("$3,21")[0].Resolution["value"]; => “3.21”

Expected behavior The output resolution should be consistent across the different cultures

nawanas avatar Aug 04 '21 12:08 nawanas

This is closely related to #2578 and #774. In my view the best solution would be to always output a canonical form (dot-separated) and do a bump in the major version of packages (start 2.*) along with the fix for #513.

tellarin avatar Aug 25 '21 07:08 tellarin