--- a/tests/koi8r/koi8r.sh
+++ b/tests/koi8r/koi8r.sh
@@ -5,8 +5,16 @@
initvariables $0
# The question is utf-8. As recollq will use the locale to translate the cmd
-# line, need an utf-8 locale
-export LANG=uk_UA.UTF-8
+# line, need an utf-8 locale. This will fails on Linux (ubuntu lucid), the
+# shell translates the argument to ?????????. As the locale is already utf-8
+# in this case, just don't change it.
+
+sys=`uname`
+case $sys in
+ Linux);;
+ *)export LANG=uk_UA.UTF-8;;
+esac
+
recollq 'внешнии' 2> $mystderr |
egrep -v '^Recoll query: ' > $mystdout