fromUtf8 function
Converts 8-bit UTF-8 octet sequence to UTF-8 character code points.
Parameters:
input
should be a valid UTF-8 octet sequence.codec
is the UTF8Codec to use.
Throws:
- FormatException if the
input
contains invalid characters.
This implementation can handle both uppercase and lowercase alphabets. If a partial string is detected, the following bits are assumed to be zeros.
Implementation
String fromUtf8(
List<int> input, {
UTF8Codec codec = UTF8Codec.standard,
}) {
var out = codec.decoder.convert(input);
return String.fromCharCodes(out);
}