Windows1251 | Cyrillic Windows-1251 Encoding Implementation for Dart

windows-1251

Cyrillic windows-1251 (cp1251) encoding implementation for Dart.

Usage

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('Привет!'));
}

Contributing

If you found a bug, just create a new issue or even better fork and issue a pull request with your fix.

Use this package as a library

Depend on it

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.

Import it

Now in your Dart code, you can use:

import 'package:windows1251/windows1251.dart';

example/example.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('Привет!'));
}

Download Details:

Author: ykmnkmi
 

Official Website: https://github.com/ykmnkmi/windows1251.dart 


 

13.60 GEEK