Article View: borland.public.jbuilder.java.swing
Article #1316Re: decimal separator ',' or '.'
From: John McGrath [TeamB]
Date: Sat, 03 Jan 2004 14:07
Date: Sat, 03 Jan 2004 14:07
27 lines
2054 bytes
2054 bytes
On 1/2/2004 at 5:39:28 PM, Serkan wrote:
> When I format a number using decimal format it was formatted using
> the current locale but when I tried to parse back the number as a
> number I was getting a number format exception.
You do not show the code or even say which methods you used. It is
hard to tell what your problem is without that.
> this is non-sense in my oponion. If a library uses the locale when
> formatting it should use the same locale when parsing back.
The Java libraries provide both locale-specific and locale-independent
formatting and parsing methods. That makes a *lot* of sense, since
both are sometimes required.
It sounds like you are using a locale-specific method for formatting
and a locale-independent method for parsing.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3ff6dace@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ff59168@newsgroups.borland.com> <3ff5f035@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c8a77c3c06d158b1 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2004-01-03 07:09:30 PST From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Re: decimal separator ',' or '.' Newsgroups: borland.public.jbuilder.java.swing References: <3ff59168@newsgroups.borland.com> <3ff5f035@newsgroups.borland.com> User-Agent: XanaNews/1.15.8.5 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 NNTP-Posting-Host: 141.158.30.197 Message-ID: <3ff6dace@newsgroups.borland.com> Date: 3 Jan 2004 07:07:58 -0700 X-Trace: newsgroups.borland.com 1073142478 141.158.30.197 (3 Jan 2004 07:07:58 -0700) Lines: 27 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail