transcode

func transcode<Input : GeneratorType, InputEncoding : UnicodeCodecType, OutputEncoding : UnicodeCodecType where InputEncoding.CodeUnit == Input.Element>(_: InputEncoding.Type, _: OutputEncoding.Type, _: Input, _: (OutputEncoding.CodeUnit) -> Void, stopOnError: Bool)

Translate input, in the given InputEncoding, into output, in the given OutputEncoding.

stopOnError: Causes encoding to stop when an encoding error is detected in input, if true. Otherwise, U+FFFD replacement characters are inserted for each detected error.

Declaration

func transcode<Input : GeneratorType, InputEncoding : UnicodeCodecType, OutputEncoding : UnicodeCodecType where InputEncoding.CodeUnit == Input.Element>(inputEncoding: InputEncoding.Type, _ outputEncoding: OutputEncoding.Type, _ input: Input, _ output: (OutputEncoding.CodeUnit) -> Void, stopOnError: Bool) -> Bool