927件ヒット
[101-200件を表示]
(0.140秒)
ライブラリ
- ビルトイン (699)
- csv (12)
- kconv (12)
-
net
/ http (72) - open-uri (24)
- psych (36)
-
rexml
/ document (60) -
webrick
/ httprequest (12)
クラス
-
ARGF
. class (12) - Array (21)
- CSV (12)
- Encoding (72)
-
Encoding
:: Converter (192) -
Encoding
:: InvalidByteSequenceError (24) -
Encoding
:: UndefinedConversionError (12) - IO (30)
- Integer (24)
-
Psych
:: Stream (24) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: Document (36) -
REXML
:: Instruction (24) - String (282)
- Time (42)
-
WEBrick
:: HTTPRequest (12)
モジュール
-
Net
:: HTTPHeader (72) -
OpenURI
:: Meta (24)
キーワード
- << (12)
-
ascii
_ compatible? (12) - asctime (12)
- b (12)
- casecmp (12)
- chr (24)
- chunked? (12)
- concat (21)
- content (12)
-
content
_ encoding (12) - convert (12)
- convpath (12)
- ctime (12)
-
destination
_ encoding (12) - each (12)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) - encode (36)
- encode! (24)
-
error
_ bytes (12) -
error
_ char (12) -
external
_ encoding (12) - finish (12)
-
force
_ encoding (12) -
incomplete
_ input? (12) -
insert
_ output (12) - inspect (30)
-
internal
_ encoding (24) - iseuc (12)
-
last
_ error (12) - name (12)
- names (12)
- pack (21)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (24)
- query (12)
- replacement (12)
- replacement= (12)
- replicate (12)
- scrub (36)
- scrub! (36)
-
set
_ encoding _ by _ bom (6) -
source
_ encoding (12) -
stand
_ alone? (12) - start (36)
- target (12)
-
to
_ s (24) -
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
-
valid
_ encoding? (12) - version (12)
検索結果
先頭5件
-
IO
# external _ encoding -> Encoding | nil (12337.0) -
IO の外部エンコーディングを返します。 外部エンコーディングが指定されていない場合は nil を返します。 ただし読み込み専用モードの場合は Encoding.default_external になります。
...ディングが指定されていない場合は nil を返します。
ただし読み込み専用モードの場合は Encoding.default_external になります。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") { |f| p f.external_encoding } # => #<Encoding:UTF-8>
//}... -
IO
# internal _ encoding -> Encoding | nil (12333.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP")
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//}... -
OpenURI
:: Meta # content _ encoding -> [String] (12246.0) -
対象となるリソースの Content-Encoding を文字列の配列として返します。 Content-Encoding ヘッダがない場合は、空の配列を返します。
...となるリソースの Content-Encoding を文字列の配列として返します。
Content-Encoding ヘッダがない場合は、空の配列を返します。
例:
//emlist[例][ruby]{
require 'open-uri'
open('http://example.com/f.tar.gz') {|f|
p f.content_encoding #=> ["x-gzip"]
}
//}......るリソースの Content-Encoding を文字列の配列として返します。
Content-Encoding ヘッダがない場合は、空の配列を返します。
例:
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://example.com/f.tar.gz') {|f|
p f.content_encoding #=> ["x-gzip"]
}
//}... -
Encoding
:: Converter # source _ encoding -> Encoding (12227.0) -
変換元のエンコーディングを返します。
...変換元のエンコーディングを返します。
@return 変換元のエンコーディング
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "euc-jp")
ec.source_encoding #=> #<Encoding:UTF-8>
//}... -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (12137.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
...//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "z" on EUC-JP>
p $!.incomplete_input? #=> false
end
begin
ec.convert("abc\......xA1")
ec.finish
rescue Encoding::InvalidByteSequenceError
p $! #=> #<Encoding::InvalidByteSequenceError: incomplete "\xA1" on EUC-JP>
p $!.incomplete_input? #=> true
end
//}... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (12131.0) -
エラー発生時に捨てられたバイト列を返します。
...//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.re......adagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Encoding
# to _ s -> String (12113.0) -
エンコーディングの名前を返します。
...エンコーディングの名前を返します。
//emlist[例][ruby]{
Encoding::UTF_8.name #=> "UTF-8"
//}... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (9849.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes......ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output......re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (9749.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes......ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output......re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (9549.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes......ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output......re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :...