]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
lang-tcl: Avoid FAIL on native Windows.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Jul 2024 10:53:46 +0000 (12:53 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jul 2024 10:53:46 +0000 (12:53 +0200)
* gettext-tools/tests/lang-tcl: Set the LANG variable as expected by tclsh.

gettext-tools/tests/lang-tcl

index ffe459002ad063260e6ef5a8b33c78de01466fa6..0cc8c3ee41269f041ea5fee5ab01fb61165da53d 100755 (executable)
@@ -95,6 +95,15 @@ unset LC_CTYPE
 
 : ${LOCALE_FR=fr_FR}
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+# tclsh on native Windows does not want the native Windows locale name
+# (French_France.1252 or French_France.65001), but the Unix locale name (fr_FR).
+# See https://www.tcl.tk/man/tcl8.6/TclCmd/msgcat.htm#M19 .
+case "$host_os" in
+  mingw* | windows*)
+    LOCALE_FR=fr_FR.ISO-8859-1
+    LOCALE_FR_UTF8=none
+    ;;
+esac
 if test $LOCALE_FR != none; then
   prepare_locale_ fr $LOCALE_FR
   LANGUAGE= LANG=$LOCALE_FR tclsh program.tcl > prog.tmp || Exit 1