Lingua::Ja::Regular::Unicode

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + tokuhirom tokuhirom 2 years ago
    文字列が latin1 だと解釈されるのは、デフォルト動作であって、use utf8; すれば挙動を変えられます。
Post a comment
Embed Video
Edit your comment Cancel

Favorites, Groups & Events

Lingua::Ja::Regular::Unicode - Presentation Transcript

  1. Lingua::JA::Regular::Unicode の作り方 tokuhirom
  2. なんでアレつかわないの?
    • Lingua::JA::Regular
      • EUC-JP にいったんしてる
      • 遅い
      • flagged utf8 以前のレガシースタイル
      • utf-8 前提ならもっと楽に書ける
    • Unicode::Japanese
      • でかい
  3. つくるもの
    • 英数字の全角から半角への変換
    • 空白の全角から半角への変換
    • カタカナ の全角から半角への変換
    • カタカナ の半角から全角への変換
    • カタカナ からひらがなへの変換
    • ひらがなから カタカナ への変換
  4. おさらい
    • 入り口で decode 出口で encode
    • 内部エンコーディングは気にしない
    • 文字列リテラルは latin1
      • だと perl は解釈
  5. Unicode文字の書き方
    • "x{30F7}"
    • use utf8;
      • "ヷ"
  6. use charnames;
    • charnames::viacode(0x30F7)
      • "KATAKANA LETTER VA"
    • charnames::vianame("KATAKANA LETTER VA")
      • " ヷ "
    • "N{KATAKANA LETTER VA}"
  7. 文字コードの処理
    • sprintf "%X", unpack 'U*', "x{30F7}"
      • "30F7"
    • pack 'U*', 0x30F7
      • " ヷ "
  8. 名前表
    • unicore/Name.pl
  9. 英数字の変換
    • FULLWIDTH ~
      • "FULLWIDTH " をトル
    • FULLWIDTH EXCLAMATION MARK
      • U+FF01
    • EXCLAMATION MARK
      • U+0021
  10. ひらがなからカタカナへ
    • HIRAGANA ~
      • "HIRAGANA " を "KATAKANA " に置換
    • KATAKANA LETTER GU
    • HIRAGANA LETTER GU
  11. カタカナの全角半角
    • Encode::JP::H2Z
      • Jcode でも使ってるよ
    • 濁点の処理がポイント
      • ガ は一文字
      • ガ は二文字
  12. That's all
    • any questions?

+ tokuhiromtokuhirom, 2 years ago

custom

1019 views, 0 favs, 0 embeds more stats

How to implement Lingua::JA::Regular::Unicode

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1019
    • 1019 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 0
  • Downloads 0
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories

Tags