decodeCp1251 function

String decodeCp1251(
  1. String body
)

Implementation

String decodeCp1251(String body) {
  Uint8List bytes = Uint8List.fromList(body.codeUnits);
  StringBuffer htmlBuffer = new StringBuffer();
  for(int i = 0; i < bytes.length; i++){
    htmlBuffer.write('${cp1251[bytes[i]]}');
  }
  return htmlBuffer.toString();
}