diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-11 17:52:51 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-11 17:52:51 +0300 |
commit | 8ab79d5829863a8ffb1a27eb0ebb67f7e5f40241 (patch) | |
tree | e9d0f1152a2b6069b005ded3240166f06e30b71f | |
parent | 46a05747133a40ac5be73bbb6ac18080e84466ab (diff) |
fix missing grapheme in mime encoded string
-rw-r--r-- | melib/src/email/compose/mime.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/melib/src/email/compose/mime.rs b/melib/src/email/compose/mime.rs index 7eddb8c0..ebcb6658 100644 --- a/melib/src/email/compose/mime.rs +++ b/melib/src/email/compose/mime.rs @@ -11,10 +11,6 @@ pub fn encode_header(value: &str) -> String { (true, true) => { ret.push_str(g); } - (false, true) => { - current_window_start = idx; - is_current_window_ascii = false; - } (true, false) => { /* If !g.is_whitespace() * @@ -31,8 +27,14 @@ pub fn encode_header(value: &str) -> String { ret.push(' '); } is_current_window_ascii = true; + current_window_start = idx; + ret.push_str(g); } } + (false, true) => { + current_window_start = idx; + is_current_window_ascii = false; + } /* RFC2047 recommends: * 'While there is no limit to the length of a multiple-line header field, each line of * a header field that contains one or more 'encoded-word's is limited to 76 |