toUnicode function
Implementation
String toUnicode(Uint8List bytes) {
final buffer = StringBuffer();
for (final byte in bytes) {
if (byte < 0x80) {
buffer.writeCharCode(byte);
} else if (reverseCp1251.containsKey(byte)) {
buffer.writeCharCode(reverseCp1251[byte]!);
} else {
buffer.writeCharCode(byte); // Fallback, may not render correctly
}
}
return buffer.toString();
}