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... :-(

CommentFileSizeAuthor
#2 nobreak_space.patch1.19 KBmarkus_petrux

Comments

markus_petrux’s picture

You 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.

markus_petrux’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

Could you please test the attached patch?

markus_petrux’s picture

You 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

markus_petrux’s picture

Title: Space thousand separator » Add support for ascii space when no-break space is used as thousands separator
Category: support » feature
markus_petrux’s picture

Status: Needs review » Fixed

Patch in #2 committed to CVS, and scheduled release 1.3

markus_petrux’s picture

Status: Fixed » Closed (fixed)