as far as provided by the system.
+2005-02-13 Bruno Haible <bruno@clisp.org>
+
+ * configure.ac: Invoke gt_LOCALE_FR_UTF8.
+
2005-02-13 Bruno Haible <bruno@clisp.org>
* configure.ac: Invoke gl_FUNC_STRTOUL. Keep AC_CHECK_FUNCS(strtoul)
dnl Checks for optional programs for the tests/lang-* tests.
gt_PROG_ANSI_CXX
gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
dnl Check whether to execute tests that rely on libasprintf.
dnl This test must be consistent with gettext-runtime/configure.ac.
+2005-02-13 Bruno Haible <bruno@clisp.org>
+
+ * locale-fr.m4 (gt_LOCALE_FR): If no locale was found or if the OS is
+ Darwin7, use 'none' instead of 'fr_FR'.
+ (gt_LOCALE_FR_UTF8): New macro.
+
2005-02-13 Bruno Haible <bruno@clisp.org>
* strtoul.m4: New file, from gnulib.
-# locale-fr.m4 serial 1 (gettext-0.13)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# locale-fr.m4 serial 2 (gettext-0.14.2)
+dnl Copyright (C) 2003, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Determine the name of a french locale with traditional encoding.
AC_DEFUN([gt_LOCALE_FR],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([for a traditional french locale], gt_cv_locale_fr, [
+ macosx=
+ case "$host_os" in
+ darwin[56]*) ;;
+ darwin*) macosx=yes;;
+ esac
+ if test -n "$macosx"; then
+ # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8
+ # encodings, but the kernel does not support them. The documentation
+ # says:
+ # "... all code that calls BSD system routines should ensure
+ # that the const *char parameters of these routines are in UTF-8
+ # encoding. All BSD system functions expect their string
+ # parameters to be in UTF-8 encoding and nothing else."
+ # See the comments in config.charset. Therefore we bypass the test.
+ gt_cv_locale_fr=none
+ else
changequote(,)dnl
- cat <<EOF > conftest.$ac_ext
+ cat <<EOF > conftest.$ac_ext
#include <locale.h>
#include <time.h>
struct tm t;
}
EOF
changequote([,])dnl
- if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
- # Test for the usual locale name.
- if (LC_ALL=fr_FR ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr=fr_FR
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=fr_FR.ISO-8859-1 ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr=fr_FR.ISO-8859-1
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
else
- # Test for the AIX, OSF/1, FreeBSD, NetBSD locale name.
- if (LC_ALL=fr_FR.ISO8859-1 ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr=fr_FR.ISO8859-1
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
else
- # Test for the HP-UX locale name.
- if (LC_ALL=fr_FR.iso88591 ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr=fr_FR.iso88591
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
else
- # Test for the Solaris 7 locale name.
- if (LC_ALL=fr ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr=fr
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
else
- # Special test for NetBSD 1.6.
- if test -f /usr/share/locale/fr_FR.ISO8859-1/LC_CTYPE; then
- gt_cv_locale_fr=fr_FR.ISO8859-1
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
else
- # None found.
- gt_cv_locale_fr=fr_FR
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/fr_FR.ISO8859-1/LC_CTYPE; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
fi
fi
fi
fi
fi
fi
+ rm -fr conftest*
fi
- rm -fr conftest*
])
LOCALE_FR=$gt_cv_locale_fr
AC_SUBST([LOCALE_FR])
])
+
+dnl Determine the name of a french locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_FR_UTF8],
+[
+ AC_CACHE_CHECK([for a french Unicode locale], gt_cv_locale_fr_utf8, [
+changequote(,)dnl
+ cat <<EOF > conftest.$ac_ext
+#include <locale.h>
+#include <time.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !defined(__BEOS__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ return 0;
+}
+EOF
+changequote([,])dnl
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ AC_SUBST([LOCALE_FR_UTF8])
+])
+2005-02-13 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Define also the environment variable
+ LOCALE_FR_UTF8.
+ * lang-bash: Don't test using the traditional french locale if it does
+ exist. Try not only the traditional french locale, but also the UTF-8
+ locale, if it exists.
+ * lang-c: Likewise.
+ * lang-c++: Likewise.
+ * lang-clisp: Likewise.
+ * lang-csharp: Likewise.
+ * lang-gawk: Likewise.
+ * lang-guile: Likewise.
+ * lang-java: Likewise.
+ * lang-librep: Likewise.
+ * lang-objc: Likewise.
+ * lang-perl-1: Likewise.
+ * lang-perl-2: Likewise.
+ * lang-php: Likewise.
+ * lang-sh: Likewise.
+ * lang-smalltalk: Likewise.
+ * lang-tcl: Likewise.
+ * lang-pascal: Likewise, but disable the test of the UTF-8 locale.
+ * lang-python-1: Likewise.
+ * lang-python-2: Likewise.
+
2005-02-12 Bruno Haible <bruno@clisp.org>
* lang-clisp: Use only the first line of "clisp --version"'s output.
TESTCSHARP='@TESTCSHARP@' \
TESTLIBASPRINTF='@TESTLIBASPRINTF@' \
LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
host_os='@host_os@' \
CONFIG_SHELL='$(SHELL)' \
$(SHELL)
*) rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.nok prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.nok prog.ok prog.oku prog.out"
# Expected result when bash is built without i18n support.
cat <<\EOF > prog.nok
'Your command, please?', asked the waiter.
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1
-: ${DIFF=diff}
-${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.sh 2 > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 clisp prog.lisp 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \
${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
: ${CSHARPEXEC="/bin/sh ../lib/csharpexec.sh"}
-LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
# Test that gawk wasn't built with --disable-nls.
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 77; }
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
+ test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk --version | grep logiciel > /dev/null
+ test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 guile -s prog.scm 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -j -d . -r prog -l fr fr.po || exit 1
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
: ${JAVAEXEC="/bin/sh ../lib/javaexec.sh"}
-LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 rep --no-rc --batch prog.jl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
# Test of gettext facilities in the Object Pascal language.
# Assumes the following packages are installed: fpk.
+# Note: This test fails with fpk 1.0.10 when an UTF-8 locale is present,
+# because fpk ignores the locale's encoding. It supports only unibyte locales.
+# This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1
-: ${DIFF=diff}
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./prog > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "'Your command, please?', asked the waiter."
-msgstr "Votre commande, s'il vous plait, dit le gar�n."
+msgstr "«Votre commande, s'il vous plait», dit le garçon."
# Les gateaux allemands sont les meilleurs du monde.
#, perl-format
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
-Votre commande, s'il vous plait, dit le gar�n.
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
|| { rm -fr $tmpfiles; exit 77; }
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
# Test for perl with libintl-perl package.
perl -M'Locale::TextDomain' -e '' 2>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
*) rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 php -q prog.php > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
# Test of gettext facilities in the Python language.
+# Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present.
+# It looks like a bug in Python's gettext.py. This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
*) rm -fr $tmpfiles; exit 77;;
esac
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
# Test of gettext facilities (including plural handling) in the Python
# language.
+# Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present.
+# It looks like a bug in Python's gettext.py. This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
*) rm -fr $tmpfiles; exit 77;;
esac
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 sh ./prog.sh 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
rm -fr $tmpfiles; exit 77;;
esac
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
Loading package I18N
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+Loading package I18N
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gst -Q prog.st > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
(tclsh version.tcl) >/dev/null 2>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles