I'm trying to read a file formated as UTF-16 LE
new File(filePath)
.openRead()
.map(utf8.decode)
.transform(new LineSplitter())
.forEach((l) => print('line: $l'));
But I get this error Unhandled Exception: FormatException: Invalid UTF-8 byte
I've also tried to use this package utf: ^0.9.0+5
but it's not an option cause of null safety.
Any ideas? Thanks