utf7-imap

Crates.ioutf7-imap
lib.rsutf7-imap
version0.3.2
sourcesrc
created_at2021-11-26 06:08:36.42838
updated_at2022-09-26 06:44:35.773846
descriptionMailbox names encoder and decoder (UTF-7 IMAP RFC 3501)
homepagehttps://github.com/iam-medvedev/rust-utf7-imap
repositoryhttps://github.com/iam-medvedev/rust-utf7-imap
max_upload_size
id487924
size11,015
Ilya Medvedev (iam-medvedev)

documentation

README

utf7-imap

Test Status Crate API

A Rust library for encoding and decoding UTF-7 string as defined by the IMAP standard in RFC 3501 (#5.1.3).

Idea is based on Python mutf7 library.

Usage

Add this to your Cargo.toml:

[dependencies]
utf7-imap = "0.3.2"

Encode

Encode UTF-7 IMAP mailbox name

https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3

use utf7_imap::encode_utf7_imap;

let test_string = String::from("Отправленные");
assert_eq!(utf7_imap::encode_utf7_imap(test_string), "&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-");

Decode

Decode UTF-7 IMAP mailbox name https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3

use utf7_imap::decode_utf7_imap;
let test_string = String::from("&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-");
assert_eq!(decode_utf7_imap(test_string), "Отправленные");

License

utf7-imap is MIT licensed.

Commit count: 16

cargo fmt