libjava.exp (libjava_init): Use UTF-8 encoding.
authorTom Tromey <tromey@redhat.com>
Fri, 27 Apr 2001 00:56:16 +0000 (00:56 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 27 Apr 2001 00:56:16 +0000 (00:56 +0000)
* lib/libjava.exp (libjava_init): Use UTF-8 encoding.
(test_libjava_from_javac): Likewise.

From-SVN: r41617

libjava/testsuite/ChangeLog
libjava/testsuite/lib/libjava.exp

index 60d6eb3798398ac27b22a4416043c6e3b331d3d0..c8b9a5f94cb8c74b98aecf333b010a5abf94a22f 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-25  Tom Tromey  <tromey@redhat.com>
+
+       * lib/libjava.exp (libjava_init): Use UTF-8 encoding.
+       (test_libjava_from_javac): Likewise.
+
 2001-04-09  Tom Tromey  <tromey@redhat.com>
 
        * libjava.lang/pr83.xfail: Removed.
index 1fca9f400f64f600b2273dddc1c3c141c18b83ee..18a07e252446fb0939ced328697d9382b291f8dd 100644 (file)
@@ -127,6 +127,9 @@ proc libjava_init { args } {
        }
     }
 
+    # Always set encoding used by gcj.
+    append GCJ_UNDER_TEST " --encoding=UTF-8"
+
     if [info exists env(LD_LIBRARY_PATH)] {
        set original_ld_library_path $env(LD_LIBRARY_PATH)
     } else {
@@ -501,15 +504,18 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
     # Find name to use for --main, and name of all class files.
     set jvscan [find_jvscan]
     verbose "jvscan is $jvscan"
+    # We insulate ourselves from the user's locale by forcing the
+    # encoding on jvscan.
+    set jvscan "compiler=$jvscan additional_flags=--encoding=UTF-8"
     set main_name [string trim \
                     [prune_warnings \
                        [libjava_tcompile $srcfile "" none \
-                          "compiler=$jvscan additional_flags=--print-main"]]]
+                          "$jvscan additional_flags=--print-main"]]]
     verbose "main name is $main_name"
     set class_out [string trim \
                     [prune_warnings \
                        [libjava_tcompile $srcfile "" none \
-                          "compiler=$jvscan additional_flags=--list-class"]]]
+                          "$jvscan additional_flags=--list-class"]]]
     verbose "class list is $class_out"
 
     if {[string match "*parse error*" $main_name]