Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codepage ¶
Codepage is a component that deterministically provides an encoder and decoder. It describes the concept of being able to interpret and encode characters from and to bytes (codepage, charmap, charset etc.).
type Converter ¶
type Converter struct { // FromCodepage is the codepage that is used to decode the reader. FromCodepage Codepage // ToCodepage is the codepage that will be used to encode decoded bytes from the reader. // Bytes of this codepage will be written to the writer. ToCodepage Codepage // BufferSize is the size of the buffer that will be used for conversion. BufferSize int }
Converter is an object that can copy a reader to a writer while performing a codepage conversion. See Convert for more info.
func (Converter) Convert ¶
Convert performs a codepage conversion of bytes from the reader and writes them to the writer. If the buffer size of this converter is zero (i.e. not specified), this will fail. If the converter uses the same codepage for reading as for writing, the reader will simply be copied to the writer, using the buffer size of this converter.