fix missing grapheme in mime encoded string

embed
Manos Pitsidianakis 2019-07-11 17:52:51 +03:00
parent 46a0574713
commit 8ab79d5829
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 6 additions and 4 deletions

View File

@ -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