|
Revision 6289, 1.2 kB
(checked in by tomi-ru, 8 months ago)
|
|
small fix for tools/
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use warnings; |
|---|
| 3 | use Encode; |
|---|
| 4 | |
|---|
| 5 | my $charset = shift or die "Usage: $0 utf-8"; |
|---|
| 6 | |
|---|
| 7 | my $message = $charset =~ /utf-?8/i ? "ゆーてぃーえふ" : encode('cp932', decode('utf-8', "えすじす")); |
|---|
| 8 | |
|---|
| 9 | print <<"..."; |
|---|
| 10 | <?xml version="1.0" encoding="$charset"?> |
|---|
| 11 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 12 | <html lang="ja" xml:lang="ja" xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 13 | <head> |
|---|
| 14 | <meta http-equiv="Content-Type" content="text/html; charset=$charset" /> |
|---|
| 15 | <title>i-mode pictogram test</title> |
|---|
| 16 | </head> |
|---|
| 17 | <body> |
|---|
| 18 | <p>target charset: $charset($message)</p> |
|---|
| 19 | <h1>docomo</h1> |
|---|
| 20 | <ol> |
|---|
| 21 | <li>uni hex cref: </li> |
|---|
| 22 | <li>uni dec cref: </li> |
|---|
| 23 | <li>utf8 binary: @{[ encode 'utf-8', "\x{E63E}" ]}</li> |
|---|
| 24 | <li>sjis hex cref: </li> |
|---|
| 25 | <li>sjis dec cref: 񣙇</li> |
|---|
| 26 | <li>sjis binary: \xF8\x9F</li> |
|---|
| 27 | </ol> |
|---|
| 28 | |
|---|
| 29 | <p>target charset: $charset($message)</p> |
|---|
| 30 | <h1>airh</h1> |
|---|
| 31 | <ol> |
|---|
| 32 | <li>uni hex cref: </li> |
|---|
| 33 | <li>uni dec cref: </li> |
|---|
| 34 | <li>utf8 binary: @{[ encode 'utf-8', "\x{E093}" ]}</li> |
|---|
| 35 | <li>sjis hex cref: </li> |
|---|
| 36 | <li>sjis dec cref: &#@{[ 0xF0D4 ]};</li> |
|---|
| 37 | <li>sjis binary: \xF0\xD4</li> |
|---|
| 38 | </ol> |
|---|
| 39 | |
|---|
| 40 | </body> |
|---|
| 41 | </html> |
|---|
| 42 | ... |
|---|
| 43 | |
|---|