Skip to content

Commit

Permalink
Update about m17n. refs #1360
Browse files Browse the repository at this point in the history
  • Loading branch information
okkez committed Sep 4, 2013
1 parent ec2c3ba commit a0cadf4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions refm/doc/spec/m17n.rd
Expand Up @@ -212,7 +212,6 @@ locale がスクリプトエンコーディングになります。

文字列リテラル、正規表現リテラルそしてシンボルリテラルから生成されるオブジェクトのエンコーディングは
スクリプトエンコーディングになります。
ただしそれらが 7bit クリーンである場合、エンコーディングは US-ASCII になります。

#@# see parser_str_new at parse.y
またスクリプトエンコーディングが US-ASCII である場合、7bit クリーンではないバックスラッシュ記法で
Expand All @@ -230,7 +229,7 @@ locale がスクリプトエンコーディングになります。

# coding: euc-jp
p __ENCODING__ #=> #<Encoding:EUC-JP>
p "abc".encoding #=> #<Encoding:US-ASCII> (7bit クリーンなので US-ASCII になる)
p "abc".encoding #=> #<Encoding:EUC-JP>
p "\x80".encoding #=> #<Encoding:EUC-JP>
p "\u3042".encoding #=> #<Encoding:UTF-8> (Unicode エスケープがあるので UTF-8 になる)
p "\x80\u3042".encoding #=> エラー
Expand Down

0 comments on commit a0cadf4

Please sign in to comment.