Utf8Codec constructor

const Utf8Codec(
  1. {bool allowMalformed = false}

Instantiates a new Utf8Codec.

The optional allowMalformed argument defines how decoder (and decode) deal with invalid or unterminated character sequences.

If it is true (and not overridden at the method invocation) decode and the decoder replace invalid (or unterminated) octet sequences with the Unicode Replacement character U+FFFD (�). Otherwise they throw a FormatException.


const Utf8Codec({bool allowMalformed = false})
    : _allowMalformed = allowMalformed;