306件ヒット
[301-306件を表示]
(0.118秒)
キーワード
- << (12)
- b (12)
- casecmp (12)
- concat (21)
- encode (36)
- encode! (24)
-
force
_ encoding (12) - iseuc (12)
- scanf (12)
- scrub (36)
- scrub! (36)
- tolocale (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
-
valid
_ encoding? (12)
検索結果
先頭1件
-
String
# iseuc -> bool (12014.0) -
self が EUC-JP なバイト列として正当であるかどうかを判定します。
...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
//}...