From: Bruno Haible Date: Wed, 23 Feb 2005 12:17:01 +0000 (+0000) Subject: Fix to avoid test failure with fr_FR locale on MacOS X. X-Git-Tag: v0.14.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17bcd9a0f377d0fb5356a01544fbd63a76173241;p=thirdparty%2Fgettext.git Fix to avoid test failure with fr_FR locale on MacOS X. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 46e03a290..6e953da3d 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2005-02-23 Bruno Haible + + * lang-java: On newer Darwin systems, set the System.out encoding to + UTF-8, not ISO-8859-1. + 2005-02-13 Bruno Haible * Makefile.am (TESTS_ENVIRONMENT): Define also the environment variable diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java index a9eb2bac8..68ece1976 100755 --- a/gettext-tools/tests/lang-java +++ b/gettext-tools/tests/lang-java @@ -27,7 +27,7 @@ public class Program { Locale.setDefault(new Locale("fr","FR")); EOF case "$host_os" in - darwin*) + darwin[56]*) cat <<\EOF >> Program.java // Some systems (like MacOS X) don't set System.out's character encoding // to ISO-8859-1, which is what we need for comparison purposes. @@ -36,6 +36,17 @@ cat <<\EOF >> Program.java true, "ISO-8859-1")); } catch (UnsupportedEncodingException e) { } +EOF + ;; + darwin*) +cat <<\EOF >> Program.java + // Some systems (like MacOS X) don't set System.out's character encoding + // to UTF-8, which is what we need for comparison purposes. + try { + System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out), + true, "UTF-8")); + } catch (UnsupportedEncodingException e) { + } EOF ;; esac