I won't repeat the whole content of "JP.dat", which is used by this script -- you can get that yourself from the source code tarball if you don't have it already. It's just a long list of utf8 code points, arranged 16 characters per line. Here are the first few lines:use Tk; use Tk::widgets qw(Text); my $mw = MainWindow->new; $mw->geometry("+10+10"); #my $font = 'Times'; my $font = 'fixed'; my $t = $mw->Scrolled(Text => -font => [$font => 24, 'normal'])->pa +ck( -fill => 'both', -expand => 1); $file = "t/JP.dat"; open(my $fh,"<:utf8",$file) || die "Cannot open $file:$!"; while (<$fh>) { # s/[^ -~\s]/?/g; $t->insert('end',$_); $t->see('end'); $mw->update; } close($fh); MainLoop;
(There's genuine utf8 character data in that "code" block -- if it looks garbled, be sure to set your browser for utf8 encoding. Also, if your PM user settings impose wrapping on code lines, this could disrupt a character or two -- that'll go away when you use the "download code" link; it appears that the PM code-wrapping process is not utf8-aware...)0x0020: ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > 0x0040: @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ 0x0060: ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ 0x8ea0: 。 「 」 、 ・ ヲ ァ ィ ゥ ェ ォ ャ ュ ョ ッ + ー ア イ ウ エ オ カ キ ク ケ コ サ シ ス セ 0x8ec0: タ チ ツ テ ト ナ ニ ヌ ネ ノ ハ �‹ フ ヘ + マ ミ ム メ モ ヤ ユ ヨ ラ リ ル レ �› ワ ン ゙
You may need to play with the font specs a bit to make it legible, or you may need to install a suitable font (sorry, I can't help with that).
Oh, and this is supposed to be perl 5.8.0 or greater, to get the ":<utf8" in the open statement to be properly understood. (I was doing it with 5.8.1 on macosx.)
In reply to Re: Displaying Kana
by graff
in thread Displaying Kana
by Trag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |