[Webkit-unassigned] [Bug 152448] [iOS Simulator] js/intl-collator.html failing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 19 01:57:30 PST 2015


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

--- Comment #7 from Sukolsak Sakshuwong <sukolsak at gmail.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151219/73fd6df8/attachment.html>


More information about the webkit-unassigned mailing list