String decodeText(String text) { List<int> codeUnits = text.codeUnits; return utf8.decode(codeUnits, allowMalformed: true); // Decoding with UTF-8 }