Lines Matching refs:encode
24 use Encode qw(encode decode find_encoding);
58 is($n_16be, encode('UTF-16BE', $nasty), qq{encode UTF-16BE});
59 is($n_16le, encode('UTF-16LE', $nasty), qq{encode UTF-16LE});
60 is($n_32be, encode('UTF-32BE', $nasty), qq{encode UTF-32BE});
61 is($n_32le, encode('UTF-32LE', $nasty), qq{encode UTF-16LE});
68 is($n_16bb, encode('UTF-16', $nasty), qq{encode UTF-16});
69 is($n_32bb, encode('UTF-32', $nasty), qq{encode UTF-32});
81 is(encode('UCS-2BE', $nasty), $f_16be, "encode UCS-2BE: fallback");
82 is(encode('UCS-2LE', $nasty), $f_16le, "encode UCS-2LE: fallback");
83 eval { encode('UCS-2BE', $nasty, 1) };
84 is(index($@, 'UCS-2BE'), 0, "encode UCS-2BE: exception");
85 eval { encode('UCS-2LE', $nasty, 1) };
86 is(index($@, 'UCS-2LE'), 0, "encode UCS-2LE: exception");
127 is(encode($enc, "\x{110000}"), pack($pack, 0xFFFD),
145 is(decode($enc, encode($enc, $utf8)), $utf8, "$enc RT");
175 is(decode("UTF-7", encode("UTF-7", $content)), $content,
186 my $result = $encoding->encode($tied, 1);