diff --git a/src/string/encoding/shared.c b/src/string/encoding/shared.c index 55f408a727..0162a8f8da 100644 --- a/src/string/encoding/shared.c +++ b/src/string/encoding/shared.c @@ -1221,7 +1221,7 @@ unicode_upcase(PARROT_INTERP, ARGIN(const STRING *src)) /* * 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 diff --git a/t/compilers/imcc/syn/objects.t b/t/compilers/imcc/syn/objects.t index c042ddf779..6f6cea6432 100644 --- a/t/compilers/imcc/syn/objects.t +++ b/t/compilers/imcc/syn/objects.t @@ -28,7 +28,7 @@ .namespace ["Foo"] .namespace [ ] .namespace [] -.namespace [unicode:"»ö«"; ascii:"perl6"] +.namespace [utf8:"»ö«"; ascii:"perl6"] .sub test $I0 = 42 diff --git a/t/compilers/imcc/syn/pcc.t b/t/compilers/imcc/syn/pcc.t index 70182944d2..b24d6c89ab 100644 --- a/t/compilers/imcc/syn/pcc.t +++ b/t/compilers/imcc/syn/pcc.t @@ -545,13 +545,13 @@ pir_output_is( <<'CODE', <<'OUT', 'Unicode allowed in method names, TT #730' ); .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 diff --git a/t/compilers/imcc/syn/regressions.t b/t/compilers/imcc/syn/regressions.t index c343774cbb..57162b5176 100644 --- a/t/compilers/imcc/syn/regressions.t +++ b/t/compilers/imcc/syn/regressions.t @@ -156,9 +156,9 @@ OUT 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 @@ OUT 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 diff --git a/t/compilers/imcc/syn/subflags.t b/t/compilers/imcc/syn/subflags.t index 4f7fd19e1b..67f4be3208 100644 --- a/t/compilers/imcc/syn/subflags.t +++ b/t/compilers/imcc/syn/subflags.t @@ -97,7 +97,7 @@ test flags on PIR subs ## 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 @@ test flags on PIR subs .end -.sub 'anon3' :nsentry(unicode:"nsentry\u2462") :subid('subid3') +.sub 'anon3' :nsentry(utf8:"nsentry\u2462") :subid('subid3') .return ('anon3') .end diff --git a/t/library/string_utils.t b/t/library/string_utils.t index 6969039c83..a24e97fd2f 100644 --- a/t/library/string_utils.t +++ b/t/library/string_utils.t @@ -68,8 +68,8 @@ Tests for String/Utils.pbc 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 diff --git a/t/op/string.t b/t/op/string.t index 8b94085205..394d35f02d 100644 --- a/t/op/string.t +++ b/t/op/string.t @@ -875,15 +875,15 @@ WHILE: # 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 @@ WHILE: # 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 @@ WHILE: .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') diff --git a/t/op/string_cclass.t b/t/op/string_cclass.t index e43a538f74..987252e276 100644 --- a/t/op/string_cclass.t +++ b/t/op/string_cclass.t @@ -309,7 +309,7 @@ push @{ $ws->{whitespace} } => @{ $ws->{whitespace_ascii} }, sub string { my $which = shift; - 'unicode:"' . join( '', @{ $ws->{$which} } ) . '"'; + 'utf8:"' . join( '', @{ $ws->{$which} } ) . '"'; } my $all_ws = string('whitespace'); @@ -350,7 +350,7 @@ OUT .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 @@ OUT .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 @@ pir_output_is( <<"CODE", <<'OUT', "unicode 0-127 find_*_cclass whitespace" ); .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 @@ OUT 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 diff --git a/t/op/string_cs.t b/t/op/string_cs.t index 28146bf18b..428cb29c77 100644 --- a/t/op/string_cs.t +++ b/t/op/string_cs.t @@ -473,7 +473,6 @@ SKIP: { CODE hello(5): ascii hello(5): utf8 -hello(5): utf8 hello(10): utf16 hello(10): ucs2 OUTPUT @@ -506,7 +505,6 @@ OUTPUT CODE (0): ascii (0): utf8 -(0): utf8 (0): utf16 (0): ucs2 OUTPUT diff --git a/t/op/stringu.t b/t/op/stringu.t index de66b04b3c..684a9f4516 100644 --- a/t/op/stringu.t +++ b/t/op/stringu.t @@ -44,7 +44,7 @@ pir_output_is( <<'CODE', < PMC. 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 @@ Tests the C PMC. 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 @@ CODE 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 @@ CODE 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: diff --git a/t/pmc/sub.t b/t/pmc/sub.t index 539d9145be..c3aeb3195e 100644 --- a/t/pmc/sub.t +++ b/t/pmc/sub.t @@ -1157,7 +1157,7 @@ OUTPUT # 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 @@ ok 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 @@ ok 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 @@ OUTPUT 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