Closed
Bug 349488
Opened 18 years ago
Closed 18 years ago
num_toLocaleString does not convert from locale encoding to Unicode
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: pascalc, Assigned: smontagu)
Details
(Keywords: fixed1.8.1, Whiteboard: [181approval pending])
Attachments
(2 files)
23.87 KB,
image/png
|
Details | |
857 bytes,
patch
|
brendan
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
1 Display an image in a window like http://www.mozilla.com/images/firefox-logo-64x64.png 2 Open the page info dialog Expected result : file size in bytes is 8 118 Actual result : file size in bytes is displayed 8Â 118 This bug can be seen with both Firefox 1.5.0.5 (Ubuntu Distro version) and 2.0b1 builds. It is not related to localisation since I can see the bug with an en-US version as well. The bug does not show up on Windows, it was confirmed by 2 more people using Gnome/Ubuntu (don't know about KDE users).
Reporter | ||
Comment 1•18 years ago
|
||
Here is a screenshot demonstrating the bug
Comment 2•18 years ago
|
||
This seems likely to be a problem with the linux implementation of toLocaleString (the page info dialog passes the number through that function before displaying it). Does |javascript:(1024).toLocaleString()| in the location bar give you the same strange result?
Reporter | ||
Comment 3•18 years ago
|
||
javascript:(1024).toLocaleString() does indeed produce the same error in Linux and not in Windows
Updated•18 years ago
|
Assignee: nobody → general
Component: Page Info → JavaScript Engine
Product: Firefox → Core
QA Contact: page.info → general
Summary: page info file size in bytes shows a parasite letter on Linux → toLocaleString produces strange output on Linux (page info file size in bytes shows a parasite letter)
Version: unspecified → 1.8 Branch
Comment 4•18 years ago
|
||
Pascal: could you provide the output of: cat /usr/share/i18n/locales/<locale> | grep "thousands" on the system that shows the bug, where <locale> is the configured system locale?
Reporter | ||
Comment 5•18 years ago
|
||
heren are the results : cat /usr/share/i18n/locales/fr_FR | grep "thousands" mon_thousands_sep "<U00A0>" thousands_sep "<U00A0>"
Component: JavaScript Engine → Build Config
Product: Core → Firefox
Version: 1.8 Branch → 1.0 Branch
Updated•18 years ago
|
Component: Build Config → Error Console
Product: Firefox → Core
Assignee | ||
Comment 6•18 years ago
|
||
What the screenshot shows is 0xC2 0xA0, which is U+00A0 in UTF-8, displayed as if it were ISO-8859-1
Assignee | ||
Updated•18 years ago
|
Summary: toLocaleString produces strange output on Linux (page info file size in bytes shows a parasite letter) → num_toLocaleString does not convert from locale encoding to Unicode
Assignee | ||
Updated•18 years ago
|
Component: Error Console → JavaScript Engine
Assignee | ||
Comment 7•18 years ago
|
||
Assignee | ||
Updated•18 years ago
|
Attachment #234836 -
Flags: review? → review?(brendan)
Comment 8•18 years ago
|
||
Comment on attachment 234836 [details] [diff] [review] Convert to Unicode Wow, how'd that get left out? Does the implementation of that hook work correctly in this case? Thanks, /be
Attachment #234836 -
Flags: review?(brendan)
Attachment #234836 -
Flags: review+
Attachment #234836 -
Flags: approval1.8.1?
Assignee | ||
Comment 9•18 years ago
|
||
The cases mentioned here work in fr_FR locale, but I would like to test it with something a bit more "solid" than a no-break-space if I can find an appropriate locale.
Assignee | ||
Comment 10•18 years ago
|
||
There are no locales on my system that use any non-ASCII code points for thousands separator or decimal separator other than U+00A0, but I tested by hacking various values into the LC_NUMERIC file, and they all displayed correctly.
Updated•18 years ago
|
Whiteboard: [181approval pending]
Updated•18 years ago
|
Flags: blocking1.8.1?
Comment 11•18 years ago
|
||
Fix checked into trunk. /be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 12•18 years ago
|
||
Comment on attachment 234836 [details] [diff] [review] Convert to Unicode a=schrep for drivers - approving all [181approval pending] bugs now that the tree is open.
Attachment #234836 -
Flags: approval1.8.1? → approval1.8.1+
Updated•18 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•