File: encoding.t

package info (click to toggle)
libencode-detect-perl 1.01-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 720 kB
  • sloc: cpp: 4,032; perl: 27; ansic: 21; makefile: 3
file content (19 lines) | stat: -r--r--r-- 409 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;
use Test::More qw(no_plan);

BEGIN { use_ok('Encode') }

our $d;

ok(require Encode::Detect);

ok($d = Encode::find_encoding('Detect'), 'new');

can_ok($d, qw(decode));

is($d->decode("\x82\xb7\x82\xb2\x82\xa2\x82\xcc\x82\xdd\x82\xc2"),
	"\x{3059}\x{3054}\x{3044}\x{306e}\x{307f}\x{3064}", "shift_jis");

is(Encode::decode("Detect", "j\xc2\x92aimerais"), "j\x92aimerais", 'utf-8');