flutter_charset_detector 1.0.1
flutter_charset_detector: ^1.0.1 copied to clipboard

Detect and decode the charset (character encoding) of text bytes

flutter_charset_detector #

Automatically detect and decode the charset (character encoding) of text bytes.

The example app; details

This plugin uses native libraries derived from the universal charset detection libraries created by Mozilla.

Supported platforms #

  • Android 4.1 (SDK 16) and higher
  • iOS 9 and higher

Supported charsets #

The detectable charsets differ by platform according to the capabilities of the underlying library; for specifics see:

Usage #

import 'package:flutter_charset_detector/flutter_charset_detector.dart';

Uint8List bytes = getBytes(); // bytes with unknown encoding
DecodingResult result = CharsetDetector.autoDecode(bytes);
print(result.charset); // => e.g. 'SHIFT_JIS'
print(result.string); // => e.g. '日本語'

See also #

  • charset_converter if you already know the name of the charset you want to encode/decode
3
likes
120
pub points
65%
popularity

Publisher

madlon-kay.com

Detect and decode the charset (character encoding) of text bytes

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_charset_detector