422 |
if (not $doc->manakai_has_bom and |
if (not $doc->manakai_has_bom and |
423 |
not defined $doc->manakai_charset) { |
not defined $doc->manakai_charset) { |
424 |
unless ($charset->{is_html_ascii_superset}) { |
unless ($charset->{is_html_ascii_superset}) { |
425 |
$onerror->(node => $doc, level => $self->{level}->{must}, |
$onerror->(node => $doc, |
426 |
|
level => $self->{level}->{must}, |
427 |
type => 'non ascii superset', |
type => 'non ascii superset', |
428 |
text => $charset_name); |
text => $charset_name); |
429 |
} |
} |
430 |
|
|
431 |
if (not $self->{has_charset} and ## TODO: This does not work now. |
if (not $self->{has_charset} and ## TODO: This does not work now. |
432 |
not $charset->{iana_names}->{'us-ascii'}) { |
not $charset->{iana_names}->{'us-ascii'}) { |
433 |
$onerror->(node => $doc, level => $self->{level}->{must}, |
$onerror->(node => $doc, |
434 |
|
level => $self->{level}->{must}, |
435 |
type => 'no character encoding declaration', |
type => 'no character encoding declaration', |
436 |
text => $charset_name); |
text => $charset_name); |
437 |
} |
} |