るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io readlines
  5. io each

検索結果

<< 1 2 3 > >>

REXML::Document#version -> String (24219.0)

XML 宣言に含まれている XML 文書のバージョンを返します。

...XML 宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.version # => "1.0"
//}...

Encoding::UndefinedConversionError#destination_encoding -> Encoding (21330.0)

エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。

...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。

@see Encoding::UndefinedConversionError#source_encoding...

Encoding::UndefinedConversionError#destination_encoding_name -> String (21213.0)

エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#destination_encoding...

Encoding::UndefinedConversionError#source_encoding -> Encoding (15230.0)

エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。

...ーディングを Encoding
オブジェクトで返します。

変換が多段階になされる場合は元の文字列のものではない
エンコーディングが返される場合があることに注意してください。

@see Encoding::UndefinedConversionError#destination_encoding...

Encoding::UndefinedConversionError#source_encoding_name -> Encoding (15214.0)

エラーを発生させた変換の変換元のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換元のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#source_encoding...

絞り込み条件を変える

Encoding::UndefinedConversionError (15072.0)

エンコーディング変換後の文字が存在しない場合に発生する例外。

...かない文字を EUC-JP に変換しようとした場合などに発生します。

//emlist[例][ruby]{
"\u2603".encode(Encoding::EUC_JP)
#=> Encoding::UndefinedConversionError: U+2603 from UTF-8 to EUC-JP
//}


変換が多段階でなされ、その途中で例外が生じた場合は、
...
...e in UTF-8 but not in EUC-JP.
rescue Encoding::UndefinedConversionError
p $!.source_encoding #=> #<Encoding:UTF-8>
p $!.destination_encoding #=> #<Encoding:EUC-JP>
p $!.source_encoding_name #=> "UTF-8"
p $!.destination_encoding_name #=> "EUC-JP"
puts $!.erro...
...r_char.dump #=> "\u{a0}"
p $!.error_char.encoding #=> #<Encoding:UTF-8>
end
//}...

Encoding::UndefinedConversionError#error_char -> String (9012.0)

エラーを発生させた1文字を文字列で返します。

...エラーを発生させた1文字を文字列で返します。

//emlist[例][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
begin
ec.convert("\u{a0}")
rescue Encoding::UndefinedConversionError
puts $!.error_char.dump #=> "\u{a0}"
end
//}...

REXML::Instruction (6018.0)

XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。

...令(XML Processing Instruction, XML PI)を表すクラス。

XML 処理命令 とは XML 文書中の <? と ?> で挟まれた部分のことで、
アプリケーションへの指示を保持するために使われます。

XML 宣言(文書先頭の <?xml version=... ?>)はXML処理命令で...
...ませんが、
似た見た目を持っています。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml...

REXML::Instruction#content -> String | nil (3012.0)

XML 処理命令の内容を返します。

...XML 処理命令の内容を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-...

REXML::Instruction#target -> String (3012.0)

XML 処理命令のターゲットを返します。

...XML 処理命令のターゲットを返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-st...

絞り込み条件を変える

<< 1 2 3 > >>