Subj : src/smblib/smbtxt.c To : Git commit to sbbs/master From : Rob Swindell Date : Wed Nov 11 2020 05:55 pm https://gitlab.synchro.net/sbbs/sbbs/-/commit/ad79c5916f7ccb3ea989eb8f Modified Files: src/smblib/smbtxt.c Log Message: Improved parsing of "charset" parameter in MIME Content-Type header. In Issue #177, the reported problem message header was "Content-Type: text/plain; charset=utf-8; format=flowed" The fact that the "charset" value was not quoted and not space delimited means the charset would have been parsed as "utf-8;", which would not provide an exact match (against "utf-8") in smb_msg_is_utf8() and thus the message body would not be considered to be utf-8 encoded. The solution is to terminate the "charset" parameter value at the semicolon, if it exists, and the value was not quoted. Also, for good measure, only search for " charset" or ";charset" to avoid false-positive parameter matches, like "notcharset". .