Bug 42755 - Web Inspector: Almost all inspector tests are failing if comma is used as decimal separator.
: Web Inspector: Almost all inspector tests are failing if comma is used as dec...
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 08:10 PDT by Ilya Tikhonovsky
Modified: 2010-08-11 00:11 PDT (History)
10 users (show)

See Also:


Attachments
[patch] initial version. (1.15 KB, patch)
2010-07-21 08:18 PDT, Ilya Tikhonovsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2010-07-21 08:10:22 PDT
%subj%
Comment 1 Ilya Tikhonovsky 2010-07-21 08:11:28 PDT
Windows with Russian locale.
Comment 2 Ilya Tikhonovsky 2010-07-21 08:18:19 PDT
Created attachment 62183 [details]
[patch] initial version.
Comment 3 Darin Adler 2010-07-21 08:19:36 PDT
Comment on attachment 62183 [details]
[patch] initial version.

This is a workaround, and not the real fix. The real fix is to change to a String formatting function that is locale independent.
Comment 4 Pavel Feldman 2010-07-21 08:23:34 PDT
(In reply to comment #3)
> (From update of attachment 62183 [details])
> This is a workaround, and not the real fix. The real fix is to change to a String formatting function that is locale independent.

It is not clear whether String formatting should be changed as a whole because of this use case. The code being fixed is supposed to produce strings compatible with JSON and it is JSON spec that requires numbers to have "." separators. Anyways, the fix is incomplete.
Comment 5 Pavel Feldman 2010-07-21 08:38:03 PDT
Comment on attachment 62183 [details]
[patch] initial version.

Ok, given that 0.5 will be formatted Ok we should land this.
Comment 6 Alexey Proskuryakov 2010-07-21 10:04:24 PDT
As Darin said, String formatting needs to be fixed - see also bug 18994.

This is a rather poor workaround - it fixes Russian locale, but a locale can use almost arbitrary formatting for numbers. In particular, even proper Russian formatting "(123.456.789,00) will remain broken.
Comment 7 Dirk Schulze 2010-07-21 12:20:57 PDT
(In reply to comment #6)
> As Darin said, String formatting needs to be fixed - see also bug 18994.
> 
> This is a rather poor workaround - it fixes Russian locale, but a locale can use almost arbitrary formatting for numbers. In particular, even proper Russian formatting "(123.456.789,00) will remain broken.

We should document all occurences of work arounds for the string formating problems. So we can fix them all at once. Otherwise, adding all this br's on bug 18994 is also some kind of documentation.
Comment 8 Ilya Tikhonovsky 2010-07-21 12:28:11 PDT
(In reply to comment #6)
> As Darin said, String formatting needs to be fixed - see also bug 18994.
> 
> This is a rather poor workaround - it fixes Russian locale, but a locale can use almost arbitrary formatting for numbers. In particular, even proper Russian formatting "(123.456.789,00) will remain broken.

According to spec %f doesn't uses thousands separator. 
It will be the problem if some locale uses something different as decimal separator.
Comment 9 Ilya Tikhonovsky 2010-08-10 22:45:30 PDT
already landed
Comment 10 Dirk Schulze 2010-08-10 23:37:24 PDT
(In reply to comment #8)
> (In reply to comment #6)
> > As Darin said, String formatting needs to be fixed - see also bug 18994.
> > 
> > This is a rather poor workaround - it fixes Russian locale, but a locale can use almost arbitrary formatting for numbers. In particular, even proper Russian formatting "(123.456.789,00) will remain broken.
> 
> According to spec %f doesn't uses thousands separator. 
> It will be the problem if some locale uses something different as decimal separator.

I guess this is what ap tried to mention. :-P We have many localas with this schema (points and commas in a float). This fix is a hack, that works for some locals, but many still fail, or will fail now. It's sad that there was no FIXME added in the patch. Normaly this patch shouldn't be in trunk. :-(
Comment 11 Ilya Tikhonovsky 2010-08-11 00:11:13 PDT
yep. it should be fixed another way.

https://bugs.webkit.org/show_bug.cgi?id=43832