<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [iOS Simulator] js/intl-collator.html failing"
   href="https://bugs.webkit.org/show_bug.cgi?id=152448#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [iOS Simulator] js/intl-collator.html failing"
   href="https://bugs.webkit.org/show_bug.cgi?id=152448">bug 152448</a>
              from <span class="vcard"><a class="email" href="mailto:sukolsak&#64;gmail.com" title="Sukolsak Sakshuwong &lt;sukolsak&#64;gmail.com&gt;"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
        <pre>Looks like it has nothing to do with the difference between iOS and OS X. I tried creating a command line tool project in Xcode and printing out uloc_getDefault(). When I ran it via Xcode, it printed &quot;en_US_POSIX&quot;. But when I ran it via command line, it printed &quot;en_US&quot;.

It seems to have something to do with the environment variable LANG. Here's a script I created to test it:

$ cat test.c
#include &lt;stdio.h&gt;
const char* uloc_getDefault();
int main() {
    printf(&quot;%s\n&quot;, uloc_getDefault());
    return 0;
}

$ echo $LANG
en_US.UTF-8
$ gcc test.c -licucore -o test
$ ./test
en_US
$ unset LANG; ./test
en_US_POSIX
$ LANG=en_US.UTF-8 ./test
en_US
$ LANG=abcdef.UTF-8 ./test
abcdef

So, I think this patch is the right thing to do. We should never assume that the default locale is English anyway. Let me know what you think. If you agree, I will fix the change log.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>