utf-8 fix

This commit is contained in:
jusax23 2023-06-07 20:52:05 +02:00
parent 33d1283788
commit fe43da5e57
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41

View file

@ -180,7 +180,7 @@ class MainPageState extends State<MainPage> {
data = file.readAsStringSync(); data = file.readAsStringSync();
} else { } else {
PlatformFile pfile = result.files.first; PlatformFile pfile = result.files.first;
data = String.fromCharCodes(pfile.bytes?.map((e) => e) ?? []); data = utf8.decode(pfile.bytes?.map((e) => e).toList() ?? []);
} }
try { try {
if (data.isEmpty) throw ErrorDescription("Empty File!"); if (data.isEmpty) throw ErrorDescription("Empty File!");