Skip to content
On this page

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.3

Encoding::Converter

< Object 14 instance methods 3 class methods

Encoding conversion class.

Class methods 3

Instance methods 14

Constants

AFTER_OUTPUT

Stop converting after some output is complete but before all of the input was consumed. See primitive_convert for an example.

CRLF_NEWLINE_DECORATOR

Decorator for converting LF to CRLF

CR_NEWLINE_DECORATOR

Decorator for converting LF to CR

INVALID_MASK

Mask for invalid byte sequences

INVALID_REPLACE

Replace invalid byte sequences

LF_NEWLINE_DECORATOR

Decorator for converting CRLF and CR to LF when writing

PARTIAL_INPUT

Indicates the source may be part of a larger string. See primitive_convert for an example.

UNDEF_HEX_CHARREF

Replace byte sequences that are undefined in the destination encoding with an XML hexadecimal character reference. This is valid for XML conversion.

UNDEF_MASK

Mask for a valid character in the source encoding but no related character(s) in destination encoding.

UNDEF_REPLACE

Replace byte sequences that are undefined in the destination encoding.

UNIVERSAL_NEWLINE_DECORATOR

Decorator for converting CRLF and CR to LF

XML_TEXT_DECORATOR

Escape as XML CharData