https://github.com/leanhtuan1994/fl_charset
Charset encoding and decoding Library, include ISO-(2-15), Windows Series, GBK, EUC-JP, EUC-KR, SHIFT-JIS, TCVN-3
https://github.com/leanhtuan1994/fl_charset
charset dart esc flutter printer
Last synced: 15 days ago
JSON representation
Charset encoding and decoding Library, include ISO-(2-15), Windows Series, GBK, EUC-JP, EUC-KR, SHIFT-JIS, TCVN-3
- Host: GitHub
- URL: https://github.com/leanhtuan1994/fl_charset
- Owner: leanhtuan1994
- License: mit
- Created: 2024-05-31T07:13:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-31T08:31:00.000Z (about 2 years ago)
- Last Synced: 2026-04-07T13:09:43.656Z (about 2 months ago)
- Topics: charset, dart, esc, flutter, printer
- Language: Dart
- Homepage: https://pub.dev/packages/fl_charset
- Size: 629 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fl_charset
Encoding and Decoding Library for Dart Language
Charset encoding and decoding Library, include ISO-(2-15), Windows Series, GBK, EUC-JP, EUC-KR, SHIFT-JIS, TCVN-3. And supported charset detect, canEncode, canDecode.
Arrange from
[utf](https://github.com/dart-archive/utf)
[fast_gbk](https://github.com/lixiangthinker/fast_gbk)
[euc](https://github.com/dsh0416/euc-jp)
[convert](https://github.com/dart-lang/convert)
## Examples
```dart
import 'package:fl_charset/fl_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));
// TCVN-3 Support
print(tcvn.encode("Đây là Tiếng Việt"))
}
```