561 |
my $char_onerror = sub { |
my $char_onerror = sub { |
562 |
my (undef, $type, %opt) = @_; |
my (undef, $type, %opt) = @_; |
563 |
!!!parse-error (layer => 'encode', |
!!!parse-error (layer => 'encode', |
564 |
%opt, type => $type, |
line => $self->{line}, column => $self->{column} + 1, |
565 |
line => $self->{line}, column => $self->{column} + 1); |
%opt, type => $type); |
566 |
if ($opt{octets}) { |
if ($opt{octets}) { |
567 |
${$opt{octets}} = "\x{FFFD}"; # relacement character |
${$opt{octets}} = "\x{FFFD}"; # relacement character |
568 |
} |
} |
720 |
return 0 if defined $self->{next_next_char}; |
return 0 if defined $self->{next_next_char}; |
721 |
my $count = $input->manakai_read_until |
my $count = $input->manakai_read_until |
722 |
($_[0], |
($_[0], |
723 |
qr/(?![$specials_range\x{FDD0}-\x{FDDF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}])[\x20-\x7E\xA0-\x{D7FF}\x{E000}-\x{10FFFD}]/, |
qr/(?![$specials_range\x{FDD0}-\x{FDDF}\x{FFFD}-\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}])[\x20-\x7E\xA0-\x{D7FF}\x{E000}-\x{10FFFD}]/, |
724 |
$_[2]); |
$_[2]); |
725 |
|
## NOTE: We need to exclude U+FFFD, otherwise reported line/column |
726 |
|
## of unassigned/illegal code point error would be wrong. |
727 |
if ($count) { |
if ($count) { |
728 |
$self->{column} += $count; |
$self->{column} += $count; |
729 |
$self->{column_prev} += $count; |
$self->{column_prev} += $count; |