U:RDoc::AnyMethod[iI" encode:ETI"String#encode;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"7The first form returns a copy of +str+ transcoded ;TI"to encoding +encoding+. ;TI"8The second form returns a copy of +str+ transcoded ;TI"(from src_encoding to dst_encoding. ;TI"9The last form returns a copy of +str+ transcoded to ;TI"(Encoding.default_internal.;To:RDoc::Markup::BlankLineo; ; [ I"1By default, the first and second form raise ;TI"@Encoding::UndefinedConversionError for characters that are ;TI"0undefined in the destination encoding, and ;TI"CEncoding::InvalidByteSequenceError for invalid byte sequences ;TI"Ein the source encoding. The last form by default does not raise ;TI"-exceptions but uses replacement strings.;T@o; ; [I"PThe +options+ Hash gives details for conversion and can have the following ;TI" keys:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I":invalid ;T; [o; ; [I"LIf the value is +:replace+, #encode replaces invalid byte sequences in ;TI"H+str+ with the replacement character. The default is to raise the ;TI"1Encoding::InvalidByteSequenceError exception;To;;[I" :undef ;T; [o; ; [I"GIf the value is +:replace+, #encode replaces characters which are ;TI"Kundefined in the destination encoding with the replacement character. ;TI"DThe default is to raise the Encoding::UndefinedConversionError.;To;;[I":replace ;T; [o; ; [I"MSets the replacement string to the given value. The default replacement ;TI"Fstring is "\uFFFD" for Unicode encoding forms, and "?" otherwise.;To;;[I":fallback ;T; [o; ; [ I"CSets the replacement string by the given object for undefined ;TI"Fcharacter. The object should be a Hash, a Proc, a Method, or an ;TI"!object which has [] method. ;TI"FIts key is an undefined character encoded in the source encoding ;TI"Cof current transcoder. Its value can be any encoding until it ;TI"Fcan be converted into the destination encoding of the transcoder.;To;;[I" :xml ;T; [o; ; [ I"+The value must be +:text+ or +:attr+. ;TI"NIf the value is +:text+ #encode replaces undefined characters with their ;TI"N(upper-case hexadecimal) numeric character references. '&', '<', and '>' ;TI"Aare converted to "&", "<", and ">", respectively. ;TI"IIf the value is +:attr+, #encode also quotes the replacement result ;TI"1(using '"'), and replaces '"' with """.;To;;[I":cr_newline ;T; [o; ; [I"8Replaces LF ("\n") with CR ("\r") if value is true.;To;;[I":crlf_newline ;T; [o; ; [I" str str.encode(dst_encoding, src_encoding [, options] ) -> str str.encode([options]) -> str ;T0[I" (*args);T@iFI" String;TcRDoc::NormalClassI" scanf;T0