at_utf7 1.0.0 copy "at_utf7: ^1.0.0" to clipboard
at_utf7: ^1.0.0 copied to clipboard

Provides methods to encode/decode strings to/from the utf7 format as defined in rfc 2152

Provides methods to encode/decode utf-7 strings or adapt the modified base64 for custom methods.

Usage #

A simple usage example:

import 'package:utf7/utf7.dart';

main() {
  // encode/decode strings
  print(Utf7.encode("ûtf-8 chäräctérs")); // +APs-tf-8 ch+AOQ-r+AOQ-ct+AOk-rs
  print(Utf7.decode("+APs-tf-8 ch+AOQ-r+AOQ-ct+AOk-rs")); // ûtf-8 chäräctérs
  // encodeAll additionally encodes characters that could be control characters
  // wherever the encoded string is used
  print(Utf7.encodeAll("A b\r\nc\$")); // A+ACA-b+AA0ACg-c+ACQ-

  // encode/decode modified base64 sequences (the part between + and -)
  print(Utf7.encodeModifiedBase64("û")); // AOQ
  print(Utf7.decodeModifiedBase64("AOQ")); // û
}
0
likes
130
points
3.69k
downloads

Publisher

unverified uploader

Weekly Downloads

Provides methods to encode/decode strings to/from the utf7 format as defined in rfc 2152

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on at_utf7