Skip to content

iam-medvedev/rust-utf7-imap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Mailbox names decoder (UTF-7 IMAP RFC3501)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages