windows-1251
Cyrillic windows-1251 (cp1251) encoding implementation for Dart.
import 'package:windows1251/windows1251.dart';
void main() {
// >>> 'Привет!'
print(windows1251.decode([207, 240, 232, 226, 229, 242, 33]));
// >>> [207, 240, 232, 226, 229, 242, 33]
print(windows1251.encode('Привет!'));
}
If you found a bug, just create a new issue or even better fork and issue a pull request with your fix.
Run this command:
With Dart:
$ dart pub add windows1251
With Flutter:
$ flutter pub add windows1251
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
windows1251: ^0.0.3
Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:windows1251/windows1251.dart';
import 'package:windows1251/windows1251.dart';
void main() {
// 'Привет!'
print(windows1251.decode([207, 240, 232, 226, 229, 242, 33]));
// [207, 240, 232, 226, 229, 242, 33]
print(windows1251.encode('Привет!'));
}
Author: ykmnkmi
Official Website: https://github.com/ykmnkmi/windows1251.dart