<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@gmail.com" title="Sukolsak Sakshuwong <sukolsak@gmail.com>"> <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 "en_US_POSIX". But when I ran it via command line, it printed "en_US".
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 <stdio.h>
const char* uloc_getDefault();
int main() {
printf("%s\n", 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>