[svn:parrot] r49513 - in trunk: src/string/encoding t/compilers/imcc/syn t/library t/op t/op/testlib t/pmc

nwellnhof at svn.parrot.org nwellnhof at svn.parrot.org
Mon Oct 11 18:40:25 UTC 2010


Author: nwellnhof
Date: Mon Oct 11 18:40:23 2010
New Revision: 49513
URL: https://trac.parrot.org/parrot/changeset/49513

Log:
[t] Convert most unicode:"" string literals to utf8:""

Modified:
   trunk/src/string/encoding/shared.c
   trunk/t/compilers/imcc/syn/objects.t
   trunk/t/compilers/imcc/syn/pcc.t
   trunk/t/compilers/imcc/syn/regressions.t
   trunk/t/compilers/imcc/syn/subflags.t
   trunk/t/library/string_utils.t
   trunk/t/op/string.t
   trunk/t/op/string_cclass.t
   trunk/t/op/string_cs.t
   trunk/t/op/stringu.t
   trunk/t/op/testlib/test_strings.pir
   trunk/t/pmc/bytebuffer.t
   trunk/t/pmc/hash.t
   trunk/t/pmc/multidispatch.t
   trunk/t/pmc/namespace.t
   trunk/t/pmc/stringbuilder.t
   trunk/t/pmc/sub.t

Modified: trunk/src/string/encoding/shared.c
==============================================================================
--- trunk/src/string/encoding/shared.c	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/src/string/encoding/shared.c	Mon Oct 11 18:40:23 2010	(r49513)
@@ -1221,7 +1221,7 @@
 
     /*
      * XXX troubles:
-     *   t/op/string_cs_45  upcase unicode:"\u01f0"
+     *   t/op/string_cs_45  upcase utf8:"\u01f0"
      *   this creates \u004a \u030c J+NON-SPACING HACEK
      *   the string needs resizing, *if* the src buffer is
      *   too short. *But* with icu 3.2/3.4 the src string is

Modified: trunk/t/compilers/imcc/syn/objects.t
==============================================================================
--- trunk/t/compilers/imcc/syn/objects.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/compilers/imcc/syn/objects.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -28,7 +28,7 @@
 .namespace ["Foo"]
 .namespace [ ]
 .namespace []
-.namespace [unicode:"»ö«"; ascii:"perl6"]
+.namespace [utf8:"»ö«"; ascii:"perl6"]
 
 .sub test
     $I0 = 42

Modified: trunk/t/compilers/imcc/syn/pcc.t
==============================================================================
--- trunk/t/compilers/imcc/syn/pcc.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/compilers/imcc/syn/pcc.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -545,13 +545,13 @@
 .sub 'main' :main
     $P0 = newclass 'Foo'
     $P1 = new $P0
-    $S0 = unicode:"foo\x{b1}"
+    $S0 = utf8:"foo\x{b1}"
     $P1.$S0(1)
-    $P1.unicode:"foo\x{b1}"(2)
+    $P1.utf8:"foo\x{b1}"(2)
 .end
 
 .namespace ['Foo']
-.sub unicode:"foo\x{b1}" :method
+.sub utf8:"foo\x{b1}" :method
     .param int count
     print 'ok '
     print count

Modified: trunk/t/compilers/imcc/syn/regressions.t
==============================================================================
--- trunk/t/compilers/imcc/syn/regressions.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/compilers/imcc/syn/regressions.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -156,9 +156,9 @@
 pir_output_is( <<'CODE', <<'OUT', 'unicode lexical identifiers (TT #575)');
  .sub main :main
     $P0 = box 'hello world'
-    .lex unicode:"$\u03b2\u03bf\u03bf", $P0
+    .lex utf8:"$\u03b2\u03bf\u03bf", $P0
 
-    $P1 = find_lex unicode:"$\u03b2\u03bf\u03bf"
+    $P1 = find_lex utf8:"$\u03b2\u03bf\u03bf"
     say $P1
  .end
 CODE
@@ -167,12 +167,12 @@
 
 pir_output_is( <<'CODE', <<'OUT', 'unicode named identifiers (TT #654)');
  .sub 'main' :main
-    'foo'(1 :named(unicode:"\x{e4}"))
+    'foo'(1 :named(utf8:"\x{e4}"))
  .end
 
  # Perl 6:  sub foo(:$ä) { say "ok $ä"; }
  .sub 'foo'
-    .param int x :named(unicode:"\x{e4}")
+    .param int x :named(utf8:"\x{e4}")
     print "ok "
     say x
  .end

Modified: trunk/t/compilers/imcc/syn/subflags.t
==============================================================================
--- trunk/t/compilers/imcc/syn/subflags.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/compilers/imcc/syn/subflags.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -97,7 +97,7 @@
     ## unicode nsentry
     .const 'Sub' $P60 = 'subid3'
     isa_ok($P60, 'Sub', 'subid3 found w/.const')
-    $P0 = get_global unicode:"nsentry\u2462"
+    $P0 = get_global utf8:"nsentry\u2462"
     $I0 = issame $P60, $P0
     ok($I0, "nsentry3 found in namespace")
 
@@ -176,7 +176,7 @@
 .end
 
 
-.sub 'anon3' :nsentry(unicode:"nsentry\u2462") :subid('subid3')
+.sub 'anon3' :nsentry(utf8:"nsentry\u2462") :subid('subid3')
     .return ('anon3')
 .end
 

Modified: trunk/t/library/string_utils.t
==============================================================================
--- trunk/t/library/string_utils.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/library/string_utils.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -68,8 +68,8 @@
     test_radix_digits('[41,42]XYZ', 'x', 0, 'AB', 7, '\x[41,42]')
     test_radix_digits('[41,42]'   , 'x', 1, 'A' , 2, '\x41')
     test_radix_digits('[41,42]'   , 'x', 4, 'B',  2, '\x42')
-    test_radix_digits('2000'      , 'x', 0, unicode:"\u2000", 4, '\x2000')
-    test_radix_digits('1680'      , 'x', 0, unicode:"\u1680", 4, '\x1680')
+    test_radix_digits('2000'      , 'x', 0, utf8:"\u2000", 4, '\x2000')
+    test_radix_digits('1680'      , 'x', 0, utf8:"\u1680", 4, '\x1680')
 .end
 
 

Modified: trunk/t/op/string.t
==============================================================================
--- trunk/t/op/string.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/op/string.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -875,15 +875,15 @@
 
     # Ascii - Non-ascii, same content
     set $S0, "hello"
-    set $S1, unicode:"hello"
+    set $S1, utf8:"hello"
     index $I1, $S0, $S1
     is( $I1, "0", 'index, 3-arg form' )
     index $I1, $S1, $S0
     is( $I1, "0", 'index, 3-arg form' )
 
     # Non-ascii, source shorter than searched
-    set $S0, unicode:"-o"
-    set $S1, unicode:"@INC"
+    set $S0, utf8:"-o"
+    set $S1, utf8:"@INC"
     index $I1, $S0, $S1
     is( $I1, "-1", 'index, 3-arg form' )
 .end
@@ -903,7 +903,7 @@
 
     # Ascii - Non-ascii, same content
     set $S0, "hello"
-    set $S1, unicode:"hello"
+    set $S1, utf8:"hello"
     index $I1, $S0, $S1, 0
     is( $I1, "0", 'index, 4-arg form' )
     index $I1, $S1, $S0, 0
@@ -922,8 +922,8 @@
 .end
 
 .sub index_trac_1482
-    $S0 = unicode:"bubuc"
-    $S1 = unicode:"buc"
+    $S0 = utf8:"bubuc"
+    $S1 = utf8:"buc"
 
     $I0 = index $S0, $S1, 0
     is ($I0, 2, 'index, 4-arg, partial-match causes failure: TT #1482')

Modified: trunk/t/op/string_cclass.t
==============================================================================
--- trunk/t/op/string_cclass.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/op/string_cclass.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -309,7 +309,7 @@
 
 sub string {
     my $which = shift;
-    'unicode:"' . join( '', @{ $ws->{$which} } ) . '"';
+    'utf8:"' . join( '', @{ $ws->{$which} } ) . '"';
 }
 
 my $all_ws = string('whitespace');
@@ -350,7 +350,7 @@
    .local int result, char, len, i
    .local string s
    s = $all_ws
-   s = unicode:"abc" . s
+   s = utf8:"abc" . s
    len = length s
    result = find_cclass .CCLASS_WHITESPACE, s, 0, len
    print result
@@ -366,7 +366,7 @@
    .local int result, char, len, i
    .local string s
    s = $all_ws
-   s .= unicode:"abc"
+   s .= utf8:"abc"
    len = length s
    result = find_not_cclass .CCLASS_WHITESPACE, s, 0, len
    print len
@@ -385,7 +385,7 @@
 .include "cclass.pasm"
    .local int result, char, len, i
    .local string s
-   s = unicode:"abc   def"
+   s = utf8:"abc   def"
    len = length s
    result = find_cclass .CCLASS_WHITESPACE, s, 0, len
    print len
@@ -403,7 +403,7 @@
 pir_output_is( <<'CODE', <<'OUT', "is_cclass, unicode first codepage" );
 .include "cclass.pasm"
 .sub main :main
-    $S1 = unicode:"ab\nC_X34.\0 \t!"
+    $S1 = utf8:"ab\nC_X34.\0 \t!"
     test1( $S1 )
 .end
 .sub test1

Modified: trunk/t/op/string_cs.t
==============================================================================
--- trunk/t/op/string_cs.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/op/string_cs.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -473,7 +473,6 @@
 CODE
 hello(5): ascii
 hello(5): utf8
-hello(5): utf8
 hello(10): utf16
 hello(10): ucs2
 OUTPUT
@@ -506,7 +505,6 @@
 CODE
 (0): ascii
 (0): utf8
-(0): utf8
 (0): utf16
 (0): ucs2
 OUTPUT

Modified: trunk/t/op/stringu.t
==============================================================================
--- trunk/t/op/stringu.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/op/stringu.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -44,7 +44,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"\x{212b}"
+    set $S0, utf8:"\x{212b}"
     print $S0
     print "\n"
     end
@@ -59,7 +59,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\x{212b}"
+    set $S0, utf8:"aaaaaa\x{212b}"
     print $S0
     print "\n"
     end
@@ -74,7 +74,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\x{212b}-aaaaaa"
+    set $S0, utf8:"aaaaaa\x{212b}-aaaaaa"
     print $S0
     print "\n"
     end
@@ -89,7 +89,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\u212b-aaaaaa"
+    set $S0, utf8:"aaaaaa\u212b-aaaaaa"
     print $S0
     print "\n"
     end
@@ -104,7 +104,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\x{1d400}-aaaaaa"
+    set $S0, utf8:"aaaaaa\x{1d400}-aaaaaa"
     print $S0
     print "\n"
     end
@@ -119,7 +119,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\U0001d400-aaaaaa"
+    set $S0, utf8:"aaaaaa\U0001d400-aaaaaa"
     print $S0
     print "\n"
     end
@@ -134,7 +134,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\x{212b}-bbbbbb\x{1d400}-cccccc"
+    set $S0, utf8:"aaaaaa\x{212b}-bbbbbb\x{1d400}-cccccc"
     print $S0
     print "\n"
     length $I0, $S0
@@ -153,7 +153,7 @@
     $P0 = getinterp
     $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
     $P1.'encoding'("utf8")
-    set $S0, unicode:"aaaaaa\x{1d400}-bbbbbb\x{212b}-cccccc"
+    set $S0, utf8:"aaaaaa\x{1d400}-bbbbbb\x{212b}-cccccc"
     print $S0
     print "\n"
     length $I0, $S0
@@ -225,7 +225,7 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<OUTPUT, "UTF8 literals" );
-    set S0, utf8:unicode:"«"
+    set S0, utf8:"«"
     length I0, S0
     print I0
     print "\n"
@@ -291,12 +291,12 @@
     .local string str
     .local string rest
 
-    str = unicode:".xyz"
+    str = utf8:".xyz"
     rest = substr str, 1
     print rest
     print "\n"
 
-    str = unicode:".xyz"
+    str = utf8:".xyz"
     $S99 = downcase str
     rest = substr str, 1
     print rest
@@ -312,7 +312,7 @@
 .sub main
     .local string str
     .local string rest
-    str = unicode:".XYZ"
+    str = utf8:".XYZ"
     $S0 = downcase str
     print $S0
     print "\n"
@@ -344,7 +344,7 @@
 .sub main
     .include 'cclass.pasm'
     .local string s
-    s = unicode:" \t\u207babc\n\u2000\u2009"
+    s = utf8:" \t\u207babc\n\u2000\u2009"
     $I9 = length s
     $I0 = is_cclass .CCLASS_WHITESPACE, s, 0
     print $I0
@@ -371,7 +371,7 @@
 .sub main
     .include 'cclass.pasm'
     .local string s
-    s = unicode:" \t\u207babc\n\u2000\u2009"
+    s = utf8:" \t\u207babc\n\u2000\u2009"
     $I9 = length s
     $I0 = is_cclass .CCLASS_ANY, s, 0
     print $I0
@@ -403,7 +403,7 @@
 .sub main
     .include 'cclass.pasm'
     .local string s
-    s = unicode:"01\u207bxyz\u0660\u17e1\u19d9"
+    s = utf8:"01\u207bxyz\u0660\u17e1\u19d9"
     $I9 = length s
     $I0 = is_cclass .CCLASS_NUMERIC, s, 0
     print $I0
@@ -425,23 +425,23 @@
 1102269
 OUTPUT
 
-    # Concatenate unicode: with iso-8859-1
+    # Concatenate utf8: with iso-8859-1
     pir_output_is(
         <<'CODE', <<"OUTPUT", "Concat unicode with iso-8859-1" );
 .sub main
-    $S0 = unicode:"A"
+    $S0 = utf8:"A"
     $S1 = ascii:"B"
     $S2 = concat $S0, $S1
     print $S2
     print "\n"
 
-    $S0 = unicode:"A"
-    $S1 = unicode:"B"
+    $S0 = utf8:"A"
+    $S1 = utf8:"B"
     $S2 = concat $S0, $S1
     print $S2
     print "\n"
 
-    $S0 = unicode:"A"
+    $S0 = utf8:"A"
     $S1 = iso-8859-1:"B"
     $S2 = concat $S0, $S1
     print $S2
@@ -457,7 +457,7 @@
 pir_output_is( <<'CODE', <<OUTPUT, "UTF-8 and Unicode hash keys");
 .sub 'main'
     .local string str0, str1
-    str0 = unicode:"\u00ab"
+    str0 = utf8:"\u00ab"
     str1 = iso-8859-1:"\xab"
 
     .local pmc hash
@@ -484,7 +484,7 @@
 pir_output_is( <<'CODE', <<OUTPUT, "UTF-8 and Unicode hash keys, full bucket" );
 .sub 'main'
     .local string str0, str1
-    str0 = unicode:"infix:\u00b1"
+    str0 = utf8:"infix:\u00b1"
     str1 = iso-8859-1:"infix:\xb1"
 
     .local pmc hash
@@ -555,7 +555,7 @@
 
 pir_output_is( <<'CODE', <<'OUT', 'numification of unicode strings float mixed' );
 .sub main :main
-    $S0 = unicode:"140 r\x{e9}sum\x{e9}s"
+    $S0 = utf8:"140 r\x{e9}sum\x{e9}s"
     $N0 = $S0
     say $N0
     $I0 = find_encoding 'ucs2'
@@ -575,14 +575,14 @@
     $S1 = chr 0xe5
     $S2 = chr 0x263b
 
-    $S0 = unicode:"\u00e5\u263b"
+    $S0 = utf8:"\u00e5\u263b"
     $S3 = concat $S1, $S2
     if $S0 == $S3 goto equal_1
     print "not "
   equal_1:
     say "equal"
 
-    $S0 = unicode:"\u263b\u00e5"
+    $S0 = utf8:"\u263b\u00e5"
     $S3 = concat $S2, $S1
     if $S0 == $S3 goto equal_2
     print "not "
@@ -598,7 +598,7 @@
 .sub 'main'
     new $P0, 'ResizablePMCArray'
     push $P0, ascii:"a"
-    push $P0, unicode:"\x{e1}" # a acute
+    push $P0, utf8:"\x{e1}" # a acute
     push $P0, iso-8859-1:"\x{e1}" # a acute
     join $S0, "", $P0
     $I0 = length $S0

Modified: trunk/t/op/testlib/test_strings.pir
==============================================================================
--- trunk/t/op/testlib/test_strings.pir	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/op/testlib/test_strings.pir	Mon Oct 11 18:40:23 2010	(r49513)
@@ -4,20 +4,18 @@
 .sub 'get_hellos'
     $P0 = new ['ResizableStringArray']
     push $P0, "hello"
-    push $P0, unicode:"hello"
-    push $P0, utf8:unicode:"hello"
-    push $P0, utf16:unicode:"hello"
-    push $P0, ucs2:unicode:"hello"
+    push $P0, utf8:"hello"
+    push $P0, utf16:"hello"
+    push $P0, ucs2:"hello"
     .return ($P0)
 .end
 
 .sub 'get_empties'
     $P0 = new ['ResizableStringArray']
     push $P0, ""
-    push $P0, unicode:""
-    push $P0, utf8:unicode:""
-    push $P0, utf16:unicode:""
-    push $P0, ucs2:unicode:""
+    push $P0, utf8:""
+    push $P0, utf16:""
+    push $P0, ucs2:""
     .return ($P0)
 .end
 

Modified: trunk/t/pmc/bytebuffer.t
==============================================================================
--- trunk/t/pmc/bytebuffer.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/bytebuffer.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -158,7 +158,7 @@
     bb = new ['ByteBuffer']
 
     # Upper case n tilde: codepoint 0xD1, utf8 encoding 0xC3, 0x91
-    #bb = utf16:unicode:"\x{D1}"
+    #bb = utf16:"\x{D1}"
     # Can't do that, or the program can't be compiled without ICU.
     # Fill the buffer with bytes instead.
 
@@ -181,7 +181,7 @@
     bb = new ['ByteBuffer']
     bb[0] = 0xC3
     bb[1] = 0x91
-    s = bb.'get_string_as'(utf8:unicode:"")
+    s = bb.'get_string_as'(utf8:"")
     n = length s
     is(n, 1, "getting utf8 from buffer gives correct length")
     n = ord s

Modified: trunk/t/pmc/hash.t
==============================================================================
--- trunk/t/pmc/hash.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/hash.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -1311,7 +1311,7 @@
 .sub unicode_keys_register_rt_39249
   $P1 = new ['Hash']
 
-  $S99 = unicode:"\u7777"
+  $S99 = utf8:"\u7777"
   $P1[$S99] = "ok"
   $S1 = $P1[$S99]
   is( $S1, 'ok', 'unicode key' )
@@ -1320,11 +1320,11 @@
 .sub unicode_keys_literal_rt_39249
   $P1 = new ['Hash']
 
-  $P1[unicode:"\u7777"] = "ok"
-  $S1 = $P1[unicode:"\u7777"]
+  $P1[utf8:"\u7777"] = "ok"
+  $S1 = $P1[utf8:"\u7777"]
   is( $S1, 'ok', 'literal unicode key' )
 
-  $S2 = unicode:"\u7777"
+  $S2 = utf8:"\u7777"
   $S1 = $P1[$S2]
   is( $S1, 'ok', 'literal unicode key lookup via var' )
 .end

Modified: trunk/t/pmc/multidispatch.t
==============================================================================
--- trunk/t/pmc/multidispatch.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/multidispatch.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -1145,20 +1145,20 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', "unicode sub names and multi" );
-.sub unicode:"\u7777" :multi(string)
+.sub utf8:"\u7777" :multi(string)
   .param pmc arg
   print 'String:'
   say arg
 .end
-.sub unicode:"\u7777" :multi(int)
+.sub utf8:"\u7777" :multi(int)
   .param pmc arg
   print 'Int:'
   say arg
 .end
 
 .sub main :main
-  unicode:"\u7777"('what')
-  unicode:"\u7777"(23)
+  utf8:"\u7777"('what')
+  utf8:"\u7777"(23)
 .end
 CODE
 String:what

Modified: trunk/t/pmc/namespace.t
==============================================================================
--- trunk/t/pmc/namespace.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/namespace.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -278,7 +278,7 @@
 
   test8:
     push_eh eh8
-    $P0 = get_global [ unicode:"Fran\x{00E7}ois" ], "baz"
+    $P0 = get_global [ utf8:"Fran\x{00E7}ois" ], "baz"
     $I0 = isnull $P0
     is($I0, 0, "Find Sub in an ISO-8859-1 NameSpace looked up by a Unicode name")
     $S0 = $P0()
@@ -291,9 +291,9 @@
 
   test9:
     push_eh eh9
-    $P0 = get_global [ unicode:"\x{20AC}uros" ], "baz"
+    $P0 = get_global [ utf8:"\x{20AC}uros" ], "baz"
     $S0 = $P0()
-    is($S0, unicode:"\x{20AC}uros", "Found sub in Unicode NameSpace")
+    is($S0, utf8:"\x{20AC}uros", "Found sub in Unicode NameSpace")
     goto end_test9
   eh9:
     ok(0, "Cannot find sub in Unicode NameSpace")
@@ -302,9 +302,9 @@
 
   test10:
     push_eh eh10
-    $P0 = get_global [ "Foo";unicode:"\x{20AC}uros" ], "baz"
+    $P0 = get_global [ "Foo";utf8:"\x{20AC}uros" ], "baz"
     $S0 = $P0()
-    is($S0, unicode:"Foo::\x{20AC}uros", "Found sub in nested Unicode NameSpace")
+    is($S0, utf8:"Foo::\x{20AC}uros", "Found sub in nested Unicode NameSpace")
     goto end_test10
   eh10:
     ok(0, "Cannot find sub in nested Unicode NameSpace")
@@ -685,15 +685,15 @@
 .end
 
 # Namesace specified in Unicode
-.namespace [ unicode:"\x{20AC}uros" ]
+.namespace [ utf8:"\x{20AC}uros" ]
 .sub 'baz'
-    .return(unicode:"\x{20AC}uros")
+    .return(utf8:"\x{20AC}uros")
 .end
 
 # Nested namespace specified in Unicode
-.namespace [ "Foo";unicode:"\x{20AC}uros" ]
+.namespace [ "Foo";utf8:"\x{20AC}uros" ]
 .sub 'baz'
-    .return(unicode:"Foo::\x{20AC}uros")
+    .return(utf8:"Foo::\x{20AC}uros")
 .end
 
 .HLL "MyHLL"

Modified: trunk/t/pmc/stringbuilder.t
==============================================================================
--- trunk/t/pmc/stringbuilder.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/stringbuilder.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -124,7 +124,7 @@
     s = repeat iso-8859-1:"x", n
     push sb, s
     # push a string that needs reallocation and has incompatible encoding rep.
-    s = unicode:"yyyy"
+    s = utf8:"yyyy"
     push sb, s
     # Check the expected string length. Not a rock solid check, but the
     # purpose of this test is just code coverage, so is enough.
@@ -158,7 +158,7 @@
     sb = new ["StringBuilder"]
 
     push sb, "le"
-    push sb, unicode:"o "
+    push sb, utf8:"o "
     push sb, iso-8859-1:"tötsch"
 
     $S0 = sb
@@ -311,7 +311,7 @@
     iterator = iter list
     .local pmc sb
     sb = new 'StringBuilder'
-    sb = unicode:""
+    sb = utf8:""
     loop:
       unless iterator goto done
       $P1 = shift iterator
@@ -359,11 +359,11 @@
 
     push sb, "foo"
     push sb, iso-8859-1:"\x{E4}\x{F6}\x{FC}"
-    push sb, utf8:unicode:"БДЖ"
+    push sb, utf8:"БДЖ"
     push sb, "bar"
 
     $S0 = sb
-    is( $S0, utf8:unicode:"fooäöüБДЖbar", 'push strings with different encodings' )
+    is( $S0, utf8:"fooäöüБДЖbar", 'push strings with different encodings' )
 .end
 
 # Local Variables:

Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t	Mon Oct 11 08:54:42 2010	(r49512)
+++ trunk/t/pmc/sub.t	Mon Oct 11 18:40:23 2010	(r49513)
@@ -1157,7 +1157,7 @@
 
 # see also #38964
 pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub names, compilation' );
-.sub unicode:"\u7777"
+.sub utf8:"\u7777"
    print "ok\n"
 .end
 CODE
@@ -1165,24 +1165,24 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub names, invocation' );
-.sub unicode:"\u7777"
+.sub utf8:"\u7777"
     print "ok\n"
 .end
 
 .sub test :main
-    unicode:"\u7777"()
+    utf8:"\u7777"()
 .end
 CODE
 ok
 OUTPUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub names, dynamic' );
-.sub unicode:"\u7777"
+.sub utf8:"\u7777"
     print "ok\n"
 .end
 
 .sub test :main
-    $P1 = find_name unicode:"\u7777"
+    $P1 = find_name utf8:"\u7777"
     $P1()
 .end
 CODE
@@ -1190,12 +1190,12 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub names' );
-.sub unicode:"\u7777"
+.sub utf8:"\u7777"
     print "ok\n"
 .end
 
 .sub test :main
-    # unicode:"\u7777" ends up as a string nicode:"\u7777
+    # utf8:"\u7777" ends up as a string nicode:"\u7777
     # (or it did, in r12860)
     $P1 = find_name 'nicode:"\u7777'
     unless null $P1 goto bad
@@ -1208,11 +1208,11 @@
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub constant' );
 .sub main :main
-    .const 'Sub' s = unicode:"\u7777"
+    .const 'Sub' s = utf8:"\u7777"
     s()
 .end
 
-.sub unicode:"\u7777"
+.sub utf8:"\u7777"
    print "ok\n"
 .end
 CODE


More information about the parrot-commits mailing list