I've notice that format_number_get_thousands_separator_options() does not contain the plain ASCII space (0x20, which is also a part of Unicode) but only the non-breaking space (0xC2A0). The URL that you are referring to in the documentation does not have any referrals to specific Unicode codes.
Is the lack of 0x20 correct? I am a native Swedish speaker and in Sweden we have a space as thousand separator. But when I press the space keyboard button it generates a 0x20. I've written tests for Format Number API and a few of them of course fail because of this. Is this a reason to add 0x32 to the list of thousand separators? Otherwise Swedish (and other) citizens will not be able to use thousand separators for their number format... :-(
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nobreak_space.patch | 1.19 KB | markus_petrux |
Comments
Comment #1
markus_petrux commentedYou can get the codes from the posix.zip file located here:
http://unicode.org/Public/cldr/1.6.1/
So the module implements what the CLDR specification says.
Maybe we have to allow ASCII space (0x20) as an alternate character when no-break space is used. I could do add that hardcoding the 0x20 in the parsing code itself, but not adding to available symbols as that's what will be used when rendering numbers, where a no-break space makes more sense than a space.
Comment #2
markus_petrux commentedCould you please test the attached patch?
Comment #3
markus_petrux commentedYou should also apply the following patch to the Formatted Number CCK module:
#335024: Add support for ascii space when no-break space is used as thousands separator
Comment #4
markus_petrux commentedComment #5
markus_petrux commentedPatch in #2 committed to CVS, and scheduled release 1.3
Comment #6
markus_petrux commented