[prev in list] [next in list] [prev in thread] [next in thread] 

List:       icu4c-support
Subject:    Re: French parsing/formatting
From:       George Rhoten <grhoten () us ! ibm ! com>
Date:       2004-06-28 5:23:58
Message-ID: OF75AF21A9.955F95AA-ON86256EC1.001CE3FA-88256EC1.001DA97F () us ! ibm ! com
[Download RAW message or body]

I agree with Steven, though the details weren't exactly spelled out.  To 
implement this easy solution, I recommend looking at the 
getDecimalFormatSymbols() API, and changing the grouping separator to 
\u0020 when it's \u00A0.  This solution is much less locale specific.  Of 
course, this solution is best if it's just taking a complete field of some 
sort of HTML form instead of number data mixed in with other text data of 
the same string.

BTW I noticed that the NumberElements that were displayed in the original 
e-mail are a little old.  You should consider upgrading to a more recent 
copy of ICU, like 3.0.

George Rhoten
IBM Globalization Center of Competency/ICU  San José, CA, USA
ICU main website: http://oss.software.ibm.com/icu/index.html



"Steven R. Loomis" <srl@jtcsv.com> 
Sent by: icu4c-support-admin@www-124.southbury.usf.ibm.com
06/24/2004 01:37 PM

To
"Metz, Paul" <pmetz@paypal.com>
cc
<icu4c-support@www-124.southbury.usf.ibm.com>
Subject
Re: French parsing/formatting






Part of the problem is knowing what part of the text is supposed to be 
a number. If you are parsing a string where you know the only contents 
are a number, you could try replacing all 0020 with 00A0.  This is 
something I have used for web forms.
-s

On 24-Ä un-2004, at 10:38 AM, Metz, Paul wrote:
> In displaying French numbers, we want to use non-breaking spaces where 
> commas are used in the US.
>
> (3 000,25 France represents 3,000.25 US, where the space is Unicode 
> 00A0)
>
> In inputting French numbers, we don't want the user to have to enter 
> non-breaking spaces, but using NumberElements as shown above, the ICU 
> won't parse "3 000,25" if it is an Ascii 0x20 space.

_______________________________________________
icu4c-support@oss.software.ibm.com - icu4c-support mailing list
To Un/Subscribe:
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu4c-support
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic