525 |
|
|
526 |
if ($char_stream) { # if supported |
if ($char_stream) { # if supported |
527 |
## "Change the encoding" algorithm: |
## "Change the encoding" algorithm: |
528 |
|
|
529 |
|
## Step 1 |
530 |
|
if (defined $self->{input_encoding} and |
531 |
|
$self->{input_encoding} eq $charset_name) { |
532 |
|
!!!parse-error (type => 'charset label:matching', |
533 |
|
text => $charset_name, |
534 |
|
level => $self->{level}->{info}); |
535 |
|
$self->{confident} = 1; |
536 |
|
return; |
537 |
|
} |
538 |
|
|
539 |
## Step 2 (HTML5 revision 3205) |
## Step 2 (HTML5 revision 3205) |
540 |
if (defined $self->{input_encoding} and |
if (defined $self->{input_encoding} and |
553 |
byte_buffer => \ $buffer->{buffer}); |
byte_buffer => \ $buffer->{buffer}); |
554 |
} |
} |
555 |
$charset_name = $charset->get_iana_name; |
$charset_name = $charset->get_iana_name; |
|
|
|
|
## Step 1 XXX |
|
|
if (defined $self->{input_encoding} and |
|
|
$self->{input_encoding} eq $charset_name) { |
|
|
!!!parse-error (type => 'charset label:matching', |
|
|
text => $charset_name, |
|
|
level => $self->{level}->{info}); |
|
|
$self->{confident} = 1; |
|
|
return; |
|
|
} |
|
556 |
|
|
557 |
!!!parse-error (type => 'charset label detected', |
!!!parse-error (type => 'charset label detected', |
558 |
text => $self->{input_encoding}, |
text => $self->{input_encoding}, |