<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>138244</bug_id>
          
          <creation_ts>2014-10-31 02:16:32 -0700</creation_ts>
          <short_desc>toLocaleString() doesn&apos;t work as it does in Firefox and Chrome</short_desc>
          <delta_ts>2014-11-02 21:54:59 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>77018</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philipp Metzler">pp</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1045253</commentid>
    <comment_count>0</comment_count>
    <who name="Philipp Metzler">pp</who>
    <bug_when>2014-10-31 02:16:32 -0700</bug_when>
    <thetext>parseInt( &apos;1000&apos; ).toLocaleString()
Result in Safari: 1.000
Result in Firefox und Chrome: 1.111

parseFloat( &apos;1000.33&apos; ).toLocaleString()
Result in Safari: 1000.33
Result in FF und Chrome: 1.000,33</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045589</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-11-02 01:00:43 -0800</bug_when>
    <thetext>Which locale were you testing under, and how did you set it? From these results, it looks like entirely different locales were used by different browsers.

&gt; Result in Safari: 1.000
&gt; Result in Firefox und Chrome: 1.111

It seems unlikely that values are actually different like this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045624</commentid>
    <comment_count>2</comment_count>
    <who name="Philipp Metzler">pp</who>
    <bug_when>2014-11-02 11:24:13 -0800</bug_when>
    <thetext>Sorry - there were some typos. It&apos;s like this:

As I&apos;m in Austria the browsers should use the de_AT locale.

parseInt( &apos;1000&apos; ).toLocaleString()
Result in Safari: 1000 (the thousands separator is missing)
Result in Firefox und Chrome: 1.000 (correct with thousands separator)

parseFloat( &apos;1000.33&apos; ).toLocaleString()
Result in Safari: 1000.33 (the thousands separator is missing)
Result in FF und Chrome: 1.000,33 (correct with thousands separator and comma as decimal mark)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045625</commentid>
    <comment_count>3</comment_count>
    <who name="Philipp Metzler">pp</who>
    <bug_when>2014-11-02 11:25:47 -0800</bug_when>
    <thetext>Result in Safari: 1000.33 (the thousands separator is missing AND the wrong decimal mark is being used. It&apos;s a point instead of a comma.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045632</commentid>
    <comment_count>4</comment_count>
    <who name="Philipp Metzler">pp</who>
    <bug_when>2014-11-02 13:23:24 -0800</bug_when>
    <thetext>I did not set the locale.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045633</commentid>
    <comment_count>5</comment_count>
    <who name="Philipp Metzler">pp</who>
    <bug_when>2014-11-02 13:30:11 -0800</bug_when>
    <thetext>I&apos;m using OS X with these settings:

language: German
region: Austria

Zahlentrennzeichen:
Gruppierung: .
Dezimal: ,

Safari and Webkit seem to ignore these settings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045655</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-11-02 21:54:59 -0800</bug_when>
    <thetext>Ugh, I somehow didn&apos;t realize that Number.toLocaleString does not take locale into consideration at all in WebKit :(

*** This bug has been marked as a duplicate of bug 77018 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>