"1..3\n"
;
Unicode::String::stringify_as(
"hex"
);
$u
= latin1(
"gjøk"
);
$u
->
hex
,
"\n"
;
"not "
unless
"$u"
eq
"U+0067 U+006a U+00f8 U+006b"
;
"ok 1\n"
;
Unicode::String::stringify_as(
"utf8"
);
$u
->
hex
,
"\n"
;
$str
=
"$u"
;
"$str\n"
;
"not "
unless
"$u"
eq
"gjøk"
;
"ok 2\n"
;
eval
{
Unicode::String::stringify_as(
"xyzzy"
);
};
$@;
"not "
unless
$@;
"ok 3\n"
;