jan.ruzicka@comcast.net wrote:
Is there any way to have the non ASCII character escaped? I don't think the shell script necessary needs to reproduce non ascii characters correctly.
Ah, you mean the non ASCII character is the problem ? Yes, when I change the test from A-umlaut to A, it passes (although it is trivial then). So, it wasn't the redirection after all.
Regards.
Adriaan van Os
[G5:gcc/p/test] adriaan% cat test_log Test Run By adriaan on 2005-01-26 04:33:36 Native configuration is powerpc-apple-darwin7 (G5.local) gpc 20041218, based on gcc-3.4.3, flags: -g -O3 -W -Wall -Wno-unused GPC-TEST-BEGIN ========================== TEST fjf165a.pas: OK
========================== GPC-TEST-END [G5:gcc/p/test] adriaan% cat fjf165a.cmp #!/bin/sh
# Try setting German locale (locally ;-) # # Which variables do we really need to set? (Probably not all of # these, but better be safe than sorry. ;-) # # The complicated redirecting is necessary on Solaris' shell which # otherwise would give messages "couldn't set locale correctly" # in the variable assignments that can't seem to be redirected # normally.
exec 3>&2 2> /dev/null LC_ALL=de_DE; export LC_ALL LC_CTYPE=de_DE; export LC_CTYPE LANG=de_DE; export LANG exec 2>&3
# Test if German locale actually works (i.e., whether the locale # database is installed on the system) cat << EOF > dummy.c #include <ctype.h> #include <locale.h> int main() { setlocale (LC_ALL, ""); printf ("%c\n", toupper ((unsigned char) 'a')); } EOF if gcc dummy.c > /dev/null 2>&1 && [ -r "$A_OUT" ] && [ x"`./"$A_OUT" 2> /dev/null`" = x"A" ]; then rm -f "$A_OUT" dummy.c $1 $2 if [ -r "$A_OUT" ] ; then ./"$A_OUT" else echo "failed" fi else rm -f dummy.c echo "SKIPPED: German locale not installed" fi