cp932.rb

version 0.1 - Aug.24.2000

目的

Microsoft版のShift-JIS CP932のみに存在する文字をquoteします。

使い方

print CP932::quote("CP932文字列", quote文字列1, quote文字列2)
quote文字列1, quote文字列2 のデフォルトは<cp932>, </cp932>です。
print CP932::quote("CP932文字列")
-> <cp932>nnnn</cp932>

使用例

print CP932::quote("CP932文字", "<cp932 code=\"", "\"/>")
-> <cp932 code="nnnn"/>

print CP932::quote("CP932文字", "&x", ";")
-> &xnnnn;

バグ

まだ文字コードの判定部分がいい加減です。
download

back