Search packages, repositories and app categories

Package detailsv2.0.1

charset

Charset encoding and decoding Library, include iso-(2-15), windows series, gbk, euc-jp, euc-kr, shift-jis. And supportted charset detect, canEncode, canDecode.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
157K
Likes
27
Pub points
150

Install package

flutter pub add charset

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The charset package provides comprehensive support for encoding and decoding various character sets, including ISO-2 to ISO-15, Windows code pages, GBK, EUC-JP, EUC-KR, and Shift-JIS. It also includes charset detection, along with methods to check if a string can be encoded or decoded using a specific charset. Ideal for applications requiring robust internationalization and text handling across diverse languages and legacy systems.

Use cases

  • Handling legacy text formats
  • Supporting multilingual content
  • Detecting unknown text encodings
  • Converting between different character encodings
  • Internationalized app localization
  • Processing non-UTF8 data streams

Key features

  • Support for multiple legacy encodings
  • Built-in charset detection
  • canEncode and canDecode utilities
  • Cross-platform compatibility
  • Lightweight and focused
  • Easy integration via Flutter pub

Suitable for

  • Apps needing legacy encoding support
  • Localization teams working with non-UTF8 data
  • Developers processing raw text from external sources
  • Projects involving Japanese, Korean, or Chinese text
  • Tools for data migration or conversion

Considerations

  • Limited to encoding/decoding operations
  • No built-in UI or formatting features
  • Requires manual charset selection in some cases
  • Not optimized for high-performance bulk processing
  • Best suited for targeted encoding tasks rather than full i18n frameworks

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

charset

pub package

cp series,win series,iso series,gbk,euc-kr,euc-jp,shift-jis,cp437,utf-16 and utf-32 Encoding and Decoding Library for Dart Language

Arrange from
utf
fast_gbk
euc convert

Examples

import 'package:charset/charset.dart';

main() {
  // default
  print(utf16.decode([254, 255, 78, 10, 85, 132, 130, 229, 108, 52]));

  print(utf16.encode("上善若水"));

  // detect
  print(hasUtf16Bom([0xFE, 0xFF, 0x6C, 0x34]));

  // advance
  Utf16Encoder encoder = utf16.encoder as Utf16Encoder;
  print(encoder.encodeUtf16Be("上善若水", false));
  print(encoder.encodeUtf16Le("上善若水", true));
}

Notice

In 0.x versions CodePage series Does not containts control characters (0x00-0x31). 0.x 版本中CodePage不含控制字符 (0x00-0x31)

Categories

Source repository

Projects using this package