| 71 |
} |
} |
| 72 |
} |
} |
| 73 |
$CHARSET{G94n}->{"\x20\x40"}->{ucs} = 0x70460000; ## DRCS 94^2 04/00 |
$CHARSET{G94n}->{"\x20\x40"}->{ucs} = 0x70460000; ## DRCS 94^2 04/00 |
| 74 |
|
$CHARSET{G94n}->{P4_0} = $CHARSET{G94n}->{"\x20\x40"}; |
| 75 |
|
|
| 76 |
for (0x60..0x6F) { |
for (0x60..0x6F) { |
| 77 |
my $F = pack 'C', $_; |
my $F = pack 'C', $_; |
| 216 |
$C{option} = { |
$C{option} = { |
| 217 |
C1invoke_to_right => 0, ## C1 invoked to: (0: ESC Fe, 1: CR) |
C1invoke_to_right => 0, ## C1 invoked to: (0: ESC Fe, 1: CR) |
| 218 |
G94n_designate_long => 0, ## (1: ESC 02/04 02/08 04/00..02) |
G94n_designate_long => 0, ## (1: ESC 02/04 02/08 04/00..02) |
| 219 |
designate_to => { ## Designated G buffer (-1: not be outputed) |
designate_to => { ## Designated G buffer (-1: not to be outputed) |
| 220 |
C0 => { |
C0 => { |
| 221 |
default => 0, |
default => 0, |
| 222 |
}, |
}, |
| 240 |
default => -1, |
default => -1, |
| 241 |
}, |
}, |
| 242 |
}, |
}, |
| 243 |
|
fallback_from_ucs => 'replacement', |
| 244 |
|
## 'replacement' / 'perl' / 'sgml' / 'sgml-hex' / 'x-u-escaped' / 'code' |
| 245 |
|
## / 'quiet' / 'quiet+back' / 'quiet+warn' / 'quiet+back+warn' / 'croak' |
| 246 |
|
## / code |
| 247 |
|
final_to_set => { |
| 248 |
|
C0 => {}, C1 => {}, G94 => {}, G94n => {}, |
| 249 |
|
G96 => {}, G96n => {}, coding_system => {}, |
| 250 |
|
}, |
| 251 |
Ginvoke_by_single_shift => [0,0,0,0], ## Invoked by SS |
Ginvoke_by_single_shift => [0,0,0,0], ## Invoked by SS |
| 252 |
Ginvoke_to_left => [1,1,1,1], ## Which invoked to? (1: L, 0: R) |
Ginvoke_to_left => [1,1,1,1], ## Which invoked to? (1: L, 0: R) |
| 253 |
private_set => { ## Private set vs Final byte |
private_set => { ## Private set vs Final byte |
| 273 |
} |
} |
| 274 |
|
|
| 275 |
sub new_object_sjis { |
sub new_object_sjis { |
| 276 |
my $C = new_object; |
my $C = &new_object; |
| 277 |
$C->{coding_system} = $CODING_SYSTEM{Csjis}; |
$C->{coding_system} = $CODING_SYSTEM{Csjis}; |
| 278 |
$C->{CR} = undef; |
$C->{CR} = undef; |
| 279 |
$C->{GR} = 'G2'; ## 0xA1-0xDF |
$C->{GR} = 'G2'; ## 0xA1-0xDF |
| 288 |
$C; |
$C; |
| 289 |
} |
} |
| 290 |
|
|
| 291 |
1; |
our %FallbackFromUCS = ( |
| 292 |
__END__ |
perl => sub { my $c = $_[2]; sprintf '\x{%04X}', ord $c }, |
| 293 |
|
sgml => sub { my $c = $_[2]; sprintf '&#%d;', ord $c }, |
| 294 |
|
'sgml-hex' => sub { my $c = $_[2]; sprintf '&#x%04X;', ord $c }, |
| 295 |
|
'x-u-escaped' => sub { my $c = $_[2]; my $C = ord $c; sprintf $C > 0xFFFF ? '\U%08X' : '\u%04X', $C }, |
| 296 |
|
); |
| 297 |
|
|
| 298 |
|
sub fallback_escape ($$$;%) { |
| 299 |
|
my (undef, $C, $c, %option) = @_; |
| 300 |
|
my $f = $option{fallback_from_ucs} ? |
| 301 |
|
(ref ($option{fallback_from_ucs}) eq 'CODE' ? $option{fallback_from_ucs} : |
| 302 |
|
$FallbackFromUCS{$option{fallback_from_ucs}}): |
| 303 |
|
(ref ($C->{option}->{fallback_from_ucs}) eq 'CODE' ? $C->{option}->{fallback_from_ucs} : |
| 304 |
|
$FallbackFromUCS{$C->{option}->{fallback_from_ucs}}); |
| 305 |
|
if (ref $f) { |
| 306 |
|
return undef if $option{_recursive} <= -10; $option{_recursive}--; ## To avoid loop |
| 307 |
|
my $self = bless {}, __PACKAGE__; |
| 308 |
|
Encode::_utf8_on ($c); |
| 309 |
|
return &$f ($self, $C, $c, \%option); |
| 310 |
|
} |
| 311 |
|
undef; |
| 312 |
|
} |
| 313 |
|
|
| 314 |
=head1 AUTHORS |
=head1 AUTHORS |
| 315 |
|
|
| 316 |
Nanashi-san |
Nanashi-san <nanashi-san@nanashi.invalid> |
| 317 |
|
|
| 318 |
Wakaba <w@suika.fam.cx> |
Wakaba <w@suika.fam.cx> |
| 319 |
|
|
| 320 |
=head1 LICENSE |
=head1 LICENSE |
| 321 |
|
|
| 322 |
Copyright 2002 AUTHORS |
Copyright 2002 AUTHORS, all rights reserved. |
| 323 |
|
|
| 324 |
This library is free software; you can redistribute it |
This library is free software; you can redistribute it |
| 325 |
and/or modify it under the same terms as Perl itself. |
and/or modify it under the same terms as Perl itself. |
| 326 |
|
|
| 327 |
=cut |
=cut |
| 328 |
|
|
| 329 |
# $Date$ |
1; # $Date$ |
|
### Charset.pm ends here |
|