Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
utf8 decode error
import 'dart:convert';
import 'dart:typed_data';
void main() {
var name = "A string containing ø";
var bytes = Uint8List.fromList(name.codeUnits);
var decoded = json.decode(utf8.decode(bytes));
print(decoded);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.