70 |
'euc-jisx0213' => \&_name_euc_japan, |
'euc-jisx0213' => \&_name_euc_japan, |
71 |
'euc-jisx0213-plane1' => \&_name_euc_japan, |
'euc-jisx0213-plane1' => \&_name_euc_japan, |
72 |
'x-euc-jisx0213-packed' => \&_name_euc_japan, |
'x-euc-jisx0213-packed' => \&_name_euc_japan, |
73 |
'x-iso-2022' => \&_name_8bit_iso_2022, |
'x-iso-2022' => \&_name_8bit_iso2022, |
74 |
'iso-2022-cn' => \&_name_8bit_iso_2022, |
'iso-2022-cn' => \&_name_8bit_iso2022, |
75 |
'iso-2022-cn-ext' => \&_name_8bit_iso_2022, |
'iso-2022-cn-ext' => \&_name_8bit_iso2022, |
76 |
'iso-2022-int-1' => \&_name_net_ascii_8bit, |
'iso-2022-int-1' => \&_name_net_ascii_8bit, |
77 |
'iso-2022-jp' => \&_name_8bit_iso_2022, |
'iso-2022-jp' => \&_name_8bit_iso2022, |
78 |
'iso-2022-jp-1' => \&_name_8bit_iso_2022, |
'iso-2022-jp-1' => \&_name_8bit_iso2022, |
79 |
'iso-2022-jp-2' => \&_name_8bit_iso_2022, |
'iso-2022-jp-2' => \&_name_8bit_iso2022, |
80 |
'iso-2022-jp-3' => \&_name_8bit_iso_2022, |
'iso-2022-jp-3' => \&_name_8bit_iso2022, |
81 |
'iso-2022-jp-3-plane1' => \&_name_8bit_iso_2022, |
'iso-2022-jp-3-plane1' => \&_name_8bit_iso2022, |
82 |
'iso-2022-kr' => \&_name_8bit_iso_2022, |
'iso-2022-kr' => \&_name_8bit_iso2022, |
83 |
'iso-8859-1' => \&_name_8bit_iso_2022, |
'iso-8859-1' => \&_name_8bit_iso2022, |
84 |
'iso-10646-j-1' => \&_name_utf16be, |
'iso-10646-j-1' => \&_name_utf16be, |
85 |
'iso-10646-ucs-2' => \&_name_utf16be, |
'iso-10646-ucs-2' => \&_name_utf16be, |
86 |
'iso-10646-ucs-4' => \&_name_utf32be, |
'iso-10646-ucs-4' => \&_name_utf32be, |
87 |
'iso-10646-ucs-basic' => \&_name_utf16be, |
'iso-10646-ucs-basic' => \&_name_utf16be, |
88 |
'iso-10646-unicode-latin1' => \&_name_utf16be, |
'iso-10646-unicode-latin1' => \&_name_utf16be, |
89 |
jis_x0201 => \&_name_shift_jis, |
jis_x0201 => \&_name_shift_jis, |
90 |
junet => \&_name_8bit_iso_2022, |
junet => \&_name_8bit_iso2022, |
91 |
'x-junet8' => \&_name_net_ascii_8bit, |
'x-junet8' => \&_name_net_ascii_8bit, |
92 |
shift_jis => \&_name_shift_jis, |
shift_jis => \&_name_shift_jis, |
93 |
shift_jisx0213 => \&_name_shift_jis, |
shift_jisx0213 => \&_name_shift_jis, |
245 |
} |
} |
246 |
} |
} |
247 |
|
|
248 |
sub _name_8bit_iso_2022 ($$) { |
sub _name_8bit_iso2022 ($$) { |
249 |
my $name = shift; my $s = shift; |
my $name = shift; my $s = shift; |
250 |
return (charset => 'us-ascii') unless $s =~ /[\x1B\x0E\x0F\x80-\xFF]/; |
return (charset => 'us-ascii') unless $s =~ /[\x1B\x0E\x0F\x80-\xFF]/; |
251 |
if ($s =~ /[\x80-\xFF]/) { |
if ($s =~ /[\x80-\xFF]/) { |
301 |
} elsif ($s =~ /[\x0E\x0F]/) { |
} elsif ($s =~ /[\x0E\x0F]/) { |
302 |
(charset => 'gb2312'); ## Actually, this is not "gb2312" |
(charset => 'gb2312'); ## Actually, this is not "gb2312" |
303 |
} else { |
} else { |
304 |
_name_7bit_iso_2022 ($name, $s); |
_name_7bit_iso2022 ($name, $s); |
305 |
} |
} |
306 |
} |
} |
307 |
|
|
336 |
} elsif ($s =~ /\x0E|\x0F|\x1B[\x4E\x4F]/) { |
} elsif ($s =~ /\x0E|\x0F|\x1B[\x4E\x4F]/) { |
337 |
(charset => 'euc-jisx0213'); ## Actually, this is not euc-japan |
(charset => 'euc-jisx0213'); ## Actually, this is not euc-japan |
338 |
} else { |
} else { |
339 |
_name_7bit_iso_2022 ($name, $s); |
_name_7bit_iso2022 ($name, $s); |
340 |
} |
} |
341 |
} |
} |
342 |
|
|
377 |
(charset => 'jis_x0201'); |
(charset => 'jis_x0201'); |
378 |
} |
} |
379 |
} else { |
} else { |
380 |
_name_7bit_iso_2022 ($name, $s); |
_name_7bit_iso2022 ($name, $s); |
381 |
} |
} |
382 |
} |
} |
383 |
|
|