Lines Matching +full:x +full:- +full:whatever

10     require Config; Config->import();
22 my @encodings = grep(/iso-?8859/,Encode::encodings());
25 my @source = qw(ascii iso8859-1 cp1250);
26 my @destiny = qw(cp1047 cp37 posix-bc);
27 my @ebcdic_sets = qw(cp1047 cp37 posix-bc);
33 my $sym = Encode->getEncoding('symbol');
34 my $uni = $sym->decode(encode(ascii => 'a'));
36 $str = $sym->encode("\N{Beta}");
41 my $tab = Encode->getEncoding($enc);
44 $uni = $tab->decode($str);
45 $cpy = $tab->encode($uni);
82 my $enc_as = 'iso8859-1';
90 is $rc,2,"return code for $ord $enc_eb -> $enc_as -> $enc_eb was not obtained";
95 my $mime = find_encoding('iso-8859-2');
96 is defined($mime),1,"Cannot find MIME-ish'iso-8859-2'";
97 my $x11 = find_encoding('iso8859-2');
98 is defined($x11),1,"Cannot find X11-ish 'iso8859-2'";
99 is $mime,$x11,"iso8598-2 and iso-8859-2 not same";
100 my $spc = find_encoding('iso 8859-2');
101 is defined($spc),1,"Cannot find 'iso 8859-2'";
102 is $spc,$mime,"iso 8859-2 and iso-8859-2 not same";
107 my $s = "$c\n".sprintf("%02X",$i);
126 ok( is_utf8("\x{100}"));
129 "\x{100}" =~ /(.)/;
133 $a = "\x{100}";
135 ok( is_utf8($a)); # weird but true: an empty UTF-8 string
137 # non-string arguments
139 use overload q("") => sub { $_[0]->[0] };
142 ok(decode(latin1 => Encode::Dummy->new("foobar")), "foobar");
143 ok(encode(utf8 => Encode::Dummy->new("foobar")), "foobar");
146 # decode_utf8 with non-string arguments
150 foreach my $name ("UTF-16LE", "UTF-8", "Latin1") {
151 my $key = (keys %{{ "whatever\x{CA}" => '' }})[0];
154 is $key, "whatever\x{CA}", "encode $name with shared hash key scalars";
156 $key = (keys %{{ "whatever\x{CA}" => '' }})[0];
159 is $key, "whatever\x{CA}", "encode $name with LEAVE_SRC and shared hash key scalars";
161 $key = (keys %{{ "whatever" => '' }})[0];
164 is $key, "whatever", "decode $name with shared hash key scalars";
166 $key = (keys %{{ "whatever" => '' }})[0];
169 is $key, "whatever", "decode $name with LEAVE_SRC and shared hash key scalars";
173 $key = (keys %{{ "whatever\x{CA}" => '' }})[0];
175 $enc->encode($kopy, Encode::FB_CROAK);
176 is $key, "whatever\x{CA}", "encode obj $name with shared hash key scalars";
178 $key = (keys %{{ "whatever\x{CA}" => '' }})[0];
180 $enc->encode($kopy, Encode::FB_CROAK | Encode::LEAVE_SRC);
181 is $key, "whatever\x{CA}", "encode obj $name with LEAVE_SRC and shared hash key scalars";
183 $key = (keys %{{ "whatever" => '' }})[0];
185 $enc->decode($kopy, Encode::FB_CROAK);
186 is $key, "whatever", "decode obj $name with shared hash key scalars";
188 $key = (keys %{{ "whatever" => '' }})[0];
190 $enc->decode($kopy, Encode::FB_CROAK | Encode::LEAVE_SRC);
191 is $key, "whatever", "decode obj $name with LEAVE_SRC and shared hash key scalars";
197 is $latin1->encode($1), $orig, '[cpan #115168] passing magic regex globals to encode';
201 is $latin1->encode(*a), '*main::'.$orig, '[cpan #115168] passing typeglobs to encode';