enough_convert
`dart:convert` 에 문자 인코딩/문자 집합/코드크 지원이 누락됨 - ISO 8859 / 라틴, 윈도우즈, DOS, GBK, Big5 및 KOI8 R/U.
`dart:convert`에서 ISO 8859 / Latin 및 Windows 문자 인코딩 지원이 누락되어 있습니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Support for character encodings / charsets / codecs missing from dart:convert.
Supports the following encodings:
Using enough_convert is pretty straight forward:
import 'package:enough_convert/enough_convert.dart';
main() {
final codec = const Windows1252Codec(allowInvalid: false);
final input = 'Il faut être bête quand même.';
final encoded = codec.encode(input);
final decoded = codec.decode([...encoded]);
print('${codec.name}: encode "$input" to "$encoded"');
print('${codec.name}: decode $encoded to "$decoded"');
}
Add this dependency your pubspec.yaml file:
dependencies:
enough_convert: ^1.6.0
The latest version or enough_convert is enough_convert version.
Dylan (not associated with this project in any way) explains the world of text encoding quite well: Plain text? Really?
Short answer: yes.
Long answer: yes, there are still many web pages, emails and other content out there that is encoded in various text encodings.
Please file feature requests and bugs at the issue tracker.
enough_convert is null-safe from v1.0.0 onward.
enough_convert is licensed under the commercial friendly Mozilla Public License 2.0