On 6/8/17 10:48 PM, Alan Bateman wrote:
On 07/06/2017 16:14, Amy Lu wrote:
Defaul.java
System.out.println(Charset.defaultCharset());
The output for "nonexist" (not supported) LC_ALL is (at least on
Solaris): US-ASCII
The output is the same as set LC_ALL from commandline:
$ export LC_ALL=nonexist
bash: warning: setlocale: LC_ALL: cannot change locale (nonexist)
$ echo $LC_ALL
nonexist
$ jdk/bin/java Default
US-ASCII
I'm not sure why though. Also not sure whether it's the same across
platforms, settings. So I make it run with the "nonexist" locale to
get the String UNSUPPORTED.
I assume "US-ASCII" is coming from nl_langinfo(CODESET), at least on
OSX/Linux/Solaris. I'm surprised that it prints "US-ASCII" on Windows
but maybe that needs a system without the JP locales to prove that.
This test won't run on Windows.
DefaultCharsetTest.java
@requires (os.family == "linux" | os.family == "solaris")
which is from the original default.sh
Maybe this test should be expanded to OSX, I can file a separate bug for
this purpose (if needed).
Thanks,
Amy
-Alan.