jis0208 1.0.1 copy "jis0208: ^1.0.1" to clipboard
jis0208: ^1.0.1 copied to clipboard

Japanese charset converter library for Dart.

This is a Japanese charset converter library for Dart.

You can encode/decode string to bytes with Japanese legacy encodings such as EUC-JP/Shift_JIS.

Features #

  • ✅ Windows-31J Encode/Decode. (a.k.a. Shift_JIS)
  • ✅ EUC-JP Encode/Decode.
  • ❌ EUC-JP-ms Encode/Decode. (not yet)
  • ❌ CP51932 Encode/Decode. (not yet)

Getting started #

Install the package from pub.dev.

dart pub add jis0208

Then import the package:

import 'package:jis0208/jis0208.dart';

Usage #

import 'dart:io';
import 'package:jis0208/jis0208.dart';

void main() {
  var encoded = Windows31JEncoder().convert('祇園精舎の鐘の声');
  stdout.add(encoded);
}

It can also be used as a streaming converter in this way:

await stdin
      .transform(Windows31JDecoder())
      .transform(LineSplitter())
      .forEach((line) => print(line));

Additional information #

This work is heavily depends on WHATWG.

They says:

Copyright © WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License. To the extent portions of it are incorporated into source code, such portions in the source code are licensed under the BSD 3-Clause License instead.

So, we license this software under the BSD 3-Clause License.

You can find the source code of this library here: https://github.com/kkazuo/jis0208 .

If you found some issues for this library, please file the issue to https://github.com/kkazuo/jis0208/issues .

No form of support will be provided. However, by discussing together we may be able to find a solution.

0
likes
150
points
594
downloads

Publisher

verified publisherkkazuo.com

Weekly Downloads

Japanese charset converter library for Dart.

Repository (GitHub)
View/report issues

Topics

#charset #converter #encode #decode #windows

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on jis0208