22件ヒット
[1-22件を表示]
(0.319秒)
検索結果
-
String
# iseuc -> bool (24231.0) -
self が EUC-JP なバイト列として正当であるかどうかを判定します。
...す。
Kconv.#iseuc(self) と同じです。
//emlist[例][ruby]{
require 'kconv'
euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0\xa5\xe9\xa5\xdf\xa5\xf3\xa5\xb0\xb8\xc0\xb8\xec\
\x52\x75\x62\x79".force_encoding('EUC-JP')
sjis_str = "\
\x83......\x49\x83\x75\x83\x57\x83\x46\x83\x4e\x83\x67\x8e\x77\x8c\xfc\
\x83\x76\x83\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\
\x52\x75\x62\x79".force_encoding('Shift_JIS')
euc_str.iseuc # => true
sjis_str.iseuc # => false
//}... -
ruby 1
. 8 . 2 feature (42.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響......lib] [new]
utf8 対応 nkf (nkf 2.x) の追加。
: kconv [lib] [new]
: Kconv.guess_old(str)
: Kconv.toutf8(str)
: Kconv.toutf16(str)
: String#toutf8,
: String#toutf16
: String#iseuc
: String#issjis
: String#isutf8
=== 2004-11-18
: StringIO.new [lib] [compat]
StringIO.newの第二引数にIO......した。また、readdir しながらブロックを呼ぶのではなく、全部を配列に貯めてから each するようになりました。((<ruby-dev:24528>))
=== 2004-10-18
: WEBrick::HTTPRequest [lib] [new]
new methods. accept, accept_charset, accept_encoding, accept_language,
co...