CodecErrorMode enum
Selects how malformed input or unrepresentable text is handled.
Semantics align with CPython error handlers of the same name. Some modes apply only to encoding or decoding, depending on the selected codec.
Values
- strict → const CodecErrorMode
-
Throws CodecException at the first conversion error.
- ignore → const CodecErrorMode
-
Omits malformed bytes or unrepresentable characters.
- replace → const CodecErrorMode
-
Emits the codec's replacement character or replacement byte sequence.
- backslashReplace → const CodecErrorMode
-
Emits Python-style backslash escape sequences for invalid input.
- xmlCharRefReplace → const CodecErrorMode
-
Emits XML numeric character references while encoding.
- nameReplace → const CodecErrorMode
-
Emits Unicode character-name escapes while encoding.
- surrogateEscape → const CodecErrorMode
-
Maps undecodable bytes to low surrogate code units and back.
- surrogatePass → const CodecErrorMode
-
Allows surrogate code units where the selected Unicode codec supports it.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
CodecErrorMode> - A constant List of the values in this enum, in order of their declaration.