naoya.dyndns.org is currently offline. Please try again later. Questions about our services? Learn more at Dyn.com.
perl は 5.8 から Unicode(utf-8) がサポートされました.5.6 でも Unicode に対応はしていましたが,ぜんぜん使い物にならず,ようやく 5.8 でまともに使えるようになったということです.ただせっかく使えるにもかか わらず perldoc などを見てもイマイチ使い方がわからないので,独自にまと めてみたのがこのページです. 誤った書き方や勘違いをしてい ることもあるので,形式的ですがこのページの内容は無保証です. 内容 文字コード変換 perlIO jperlからの移行 UTF-8フラグ 文字コード自動判別 Unicode Standard Unicode 正規化 その他 参考資料 文字コード変換 とりあえず perl5.8 で新しく組み込まれた機能を見るために,euc-jp から shift_jis への変換スクリプトをいくつか載せます. openを利用し
Perl 5.8ではEncode.pmが標準モジュールとなり、多バイト文字を標準で簡単に扱えるようになりました。が、jcode.plやJcode.pmを用いたコード変換の経験があると、逆にこれが仇となって文字化けの嵐に遭います。(私の場合そうだったというだけで、普通はそんなこと無いのかもしれないのですが。)漸く最近になって基本的な考え方が飲み込めるようになって来たので、この辺をまとめておこうと思います。なお、本メモは新たにPerl 5.8.x的なPerlスクリプトを書く際に気をつけることをまとめたものであり、基本的には既存のスクリプトにPerl 5.8 + Encode.pmを適用するためのものではありません。また、utf8でスクリプトを書くことを前提にしています。が、どちらにせよ、この知識は参考になると思います。(たぶん。) 本文冒頭ですが、まず参照先を示しておきます。以下のドキュメント
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く