449 |
$msg =~ s{<var>{value}</var>}{ |
$msg =~ s{<var>{value}</var>}{ |
450 |
defined $opt{value} ? $htescape->($opt{value}) : '' |
defined $opt{value} ? $htescape->($opt{value}) : '' |
451 |
}ge; |
}ge; |
452 |
|
$msg =~ s{<var>{octets}</var>}{ |
453 |
|
if (defined $opt{octets}) { |
454 |
|
join ', ', map {sprintf '0x%02X', ord $_} split //, ${$opt{octets}}; |
455 |
|
} else { |
456 |
|
''; |
457 |
|
} |
458 |
|
}ge; |
459 |
|
$msg =~ s{<var>{char}</var>}{ |
460 |
|
defined $opt{char} ? $htescape->(${$opt{char}}) : '' |
461 |
|
}ge; |
462 |
|
$msg =~ s{<var>{char:hexref}</var>}{ |
463 |
|
if (defined $opt{char}) { |
464 |
|
join '', map {sprintf '&#x%02X;', ord $_} split //, ${$opt{char}}; |
465 |
|
} else { |
466 |
|
''; |
467 |
|
} |
468 |
|
}ge; |
469 |
$msg =~ s{<var>{local-name}</var>}{ |
$msg =~ s{<var>{local-name}</var>}{ |
470 |
UNIVERSAL::can ($node, 'manakai_local_name') |
UNIVERSAL::can ($node, 'manakai_local_name') |
471 |
? $htescape->($node->manakai_local_name) : '' |
? $htescape->($node->manakai_local_name) : '' |
538 |
my $options = sub ($) { |
my $options = sub ($) { |
539 |
my $context = shift; |
my $context = shift; |
540 |
|
|
541 |
$out->html (q[<div class="details default"><p class=legend onclick="nextSibling.style.display = nextSibling.style.display == 'block' ? 'none' : 'block'; parentNode.className = nextSibling.style.display == 'none' ? 'details' : 'details open'">]); |
$out->html (q[<div class="details default"><p class=legend onclick="nextSibling.style.display = nextSibling.style.display == 'block' ? 'none' : 'block'; parentNode.className = nextSibling.style.display == 'none' ? 'details' : 'details open'" tabindex=0>]); |
542 |
$out->nl_text (q[Options]); |
$out->nl_text (q[Options]); |
543 |
$out->start_tag ('div'); |
$out->start_tag ('div'); |
544 |
|
|
581 |
{label => 'Japanese charsets', options => [ |
{label => 'Japanese charsets', options => [ |
582 |
{value => 'Windows-31J'}, |
{value => 'Windows-31J'}, |
583 |
{value => 'Shift_JIS'}, |
{value => 'Shift_JIS'}, |
584 |
|
{value => 'x-sjis'}, |
585 |
{value => 'EUC-JP'}, |
{value => 'EUC-JP'}, |
586 |
|
{value => 'x-euc-jp'}, |
587 |
{value => 'ISO-2022-JP'}, |
{value => 'ISO-2022-JP'}, |
588 |
|
{value => 'ISO-2022-JP-1'}, |
589 |
|
{value => 'ISO-2022-JP-2'}, |
590 |
]}, |
]}, |
591 |
{label => 'European charsets', options => [ |
{label => 'Latin charsets', options => [ |
592 |
|
{value => 'Windows-1250'}, |
593 |
{value => 'Windows-1252'}, |
{value => 'Windows-1252'}, |
594 |
|
{value => 'Windows-1254'}, |
595 |
|
{value => 'Windows-1257'}, |
596 |
|
{value => 'Windows-1258'}, |
597 |
{value => 'ISO-8859-1'}, |
{value => 'ISO-8859-1'}, |
598 |
|
{value => 'ISO-8859-2'}, |
599 |
|
{value => 'ISO-8859-3'}, |
600 |
|
{value => 'ISO-8859-4'}, |
601 |
|
{value => 'ISO-8859-9'}, |
602 |
|
{value => 'ISO-8859-10'}, |
603 |
|
{value => 'ISO-8859-13'}, |
604 |
|
{value => 'ISO-8859-14'}, |
605 |
|
{value => 'ISO-8859-15'}, |
606 |
|
{value => 'ISO-8859-16'}, |
607 |
{value => 'US-ASCII'}, |
{value => 'US-ASCII'}, |
608 |
]}, |
]}, |
609 |
{label => 'Asian charsets', options => [ |
{label => 'Greek charsets', options => [ |
610 |
|
{value => 'Windows-1253'}, |
611 |
|
{value => 'ISO-8859-7'}, |
612 |
|
]}, |
613 |
|
{label => 'Cyrillic charsets', options => [ |
614 |
|
{value => 'Windows-1251'}, |
615 |
|
{value => 'ISO-8859-5'}, |
616 |
|
]}, |
617 |
|
{label => 'Arabic charsets', options => [ |
618 |
|
{value => 'Windows-1256'}, |
619 |
|
{value => 'ISO-8859-6'}, |
620 |
|
]}, |
621 |
|
{label => 'Hebrew charsets', options => [ |
622 |
|
{value => 'Windows-1255'}, |
623 |
|
{value => 'ISO-8859-8'}, |
624 |
|
]}, |
625 |
|
{label => 'Thai charsets', options => [ |
626 |
{value => 'Windows-874'}, |
{value => 'Windows-874'}, |
627 |
{value => 'ISO-8859-11'}, |
{value => 'ISO-8859-11'}, |
628 |
{value => 'TIS-620'}, |
{value => 'TIS-620'}, |
629 |
]}, |
]}, |
630 |
|
{label => 'Chinese charsets', options => [ |
631 |
|
{value => 'Big5'}, |
632 |
|
{value => 'x-x-big5'}, |
633 |
|
{value => 'Big5-HKSCS'}, |
634 |
|
{value => 'GBK'}, |
635 |
|
{value => 'GB2312'}, |
636 |
|
{value => 'GB_2312-80'}, |
637 |
|
{value => 'ISO-2022-CN'}, |
638 |
|
{value => 'ISO-2022-CN-EXT'}, |
639 |
|
]}, |
640 |
|
{label => 'Korean charsets', options => [ |
641 |
|
{value => 'Windows-949'}, |
642 |
|
{value => 'EUC-KR'}, |
643 |
|
{value => 'KS_C_5601-1987'}, |
644 |
|
{value => 'ISO-2022-KR'}, |
645 |
|
]}, |
646 |
{label => 'Unicode charsets', options => [ |
{label => 'Unicode charsets', options => [ |
647 |
{value => 'UTF-8'}, |
{value => 'UTF-8'}, |
648 |
{value => 'UTF-8n'}, |
{value => 'UTF-8n'}, |
649 |
]}, |
{value => 'UTF-16'}, |
650 |
|
{value => 'UTF-16BE'}, |
651 |
|
{value => 'UTF-16LE'}, |
652 |
|
]}, |
653 |
], name => 'charset', |
], name => 'charset', |
654 |
selected => scalar $cgi->get_parameter ('charset')); |
selected => scalar $cgi->get_parameter ('charset')); |
655 |
$out->end_tag ('label'); |
$out->end_tag ('label'); |