Skip to content
pubscout

charset

2.0.1, released 3 years ago by shirne.com

Charset encoding and decoding library for various text encodings in Dart.

WASM-readySingle maintainer
$ flutter pub add charset
Source repository

What it does

Provides encoding and decoding support for various character sets including ISO series, Windows series, GBK, EUC-JP, EUC-KR, and Shift-JIS. It also supports charset detection, canEncode, and canDecode functions.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to encode or decode legacy or regional character encodings like GBK, Shift-JIS, or EUC-JP.
  • You need to detect the character encoding of byte data.

Skip it when

  • You only need standard UTF-8 or ASCII encoding which is already built into Dart's core libraries.

Strengths

  • Supports a wide variety of legacy and international character sets.
  • Includes features for charset detection and validation (canEncode/canDecode).

Weaknesses

  • Limited documentation beyond basic code examples.
  • No topics specified on pub.dev.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Not documented

import 'package:charset/charset.dart';

main() {
  print(utf16.decode([254, 255, 78, 10, 85, 132, 130, 229, 108, 52]));
  print(utf16.encode("上善若水"));
}

Alternatives

Packages that do the same job and could replace charset.

Works with

Packages commonly used together with charset: ones it builds on, ones built on it, and its own family.