るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.072秒)
トップページ > クエリ:-[x] > クエリ:guess[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

種類

ライブラリ

モジュール

キーワード

検索結果

Kconv.#guess(str) -> Encoding | nil (18231.0)

文字列 str のエンコーディングを判定します。戻り値は Kconv の定数です。

...nv の定数です。

このモジュール関数で判定できるのは、
* ISO-2022-JP (Kconv::JIS)
* Shift_JIS (Kconv::SJIS)
* EUC-JP (Kconv::EUC)
* ASCII (Kconv::ASCII)
* UTF-8 (Kconv::UTF8)
* UTF-16BE (Kconv::UTF16)
* 不明 (Kconv::UNKNOWN)
* 以上のどれでもない (Kco...

NKF.#guess(str) -> Encoding (18201.0)

文字列 str の漢字コードを推測して返します。

文字列 str の漢字コードを推測して返します。

返される値は、NKF モジュールのモジュール定数です。

返される値(すなわち、推測可能なエンコーディング)は以下のいずれかです。
* NKF::JIS
* NKF::EUC
* NKF::SJIS
* NKF::UNKNOWN
* NKF::UTF8
* NKF::UTF16
* Encoding::EUCJP_MS
* Encoding::CP51932
* Encoding::WINDOWS_31J

@param str 推測対象の文字列です。

ruby 1.8.2 feature (1302.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更
* [change]: 変更されたクラス/メソッドなど(互換性のない...
...の?)
* [obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加

== 1.8.1 (2003-12-25) -> 1.8.2 (2004-12-25)

* cgi/session においてクライアントからセッション ID を指定できてしまうバグが
修正されました...
...nSSL::PKey::RSA.

=== 2004-12-05
: OptionParser::Completion#complete [lib] [compat]
new parameter to direct case insensitiveness.

: OptionParser#order! [lib] [change]
((<ruby-dev:25048>))

=== 2004-12-04
: NKF.guess [lib] [compat]
NKF.guess は NKF.guess2 の alias になりま...

NKF (816.0)

nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を Ruby から使うためのモジュールです。

...字コード変換コマンドの例です。

//emlist[例][ruby]{
#!/usr/local/bin/ruby

require 'nkf'

opt = ''
opt = ARGV.shift if ARGV[0][0] == ?-

while line = ARGF.gets
print NKF.nkf(opt, line)
end
//}

以下は、漢字コード判別コマンドの例です。

//emlist[例][ruby]{
#!/us...
...nil) }

printf "%-10s ", file
if str.nil?
puts "EMPTY"
else
puts CODES.fetch(NKF.guess(str))
end
end
//}

=== オプション文字列

-
b 入力がバッファリングされる(デフォルト)
-
u 入力がバッファリングされない
-
j -s -e -w -w16 出力するエ...
...
-
j ISO-2022-JP (7bit JIS) を出力する(デフォルト)
-
s Shift_JIS を出力する
-
e EUC-JP を出力する
-
w UTF-8 を出力する(BOMなし)
-
w16 UTF-16 LE を出力する
-
J -S -E -W -W16 入力文字列のエンコーディングの推定値を指定する。
-
J...

Kconv::BINARY -> Encoding (116.0)

JIS EUC SJIS 以外を表します。 この値はKconv.#guessの返り値としてのみ用いられます。

...JIS EUC SJIS 以外を表します。
この値はKconv.#guessの返り値としてのみ用いられます。...

絞り込み条件を変える

CSV (18.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...important to note that while all of CSV's core parser is now
Encoding agnostic, some features are not. For example, the built-in
converters will try to transcode data to UTF-8 before making conversions.
Again, you can provide custom converters that are aware of your Encodings to
avoid this translat...
...is not ASCII compatible. There's no existing data for CSV to use to
prepare itself and thus you will probably need to manually specify the desired
Encoding for most of those cases. It will try to guess using the fields in a
row of output though, when using CSV::generate_line() or Array#to_csv()....