Commit 726223ee authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

For sub-boards configured to export "ASCII Only", convert UTF-8 correctly

This converts the body text as well as the to, from, and subject header
fields (first to CP437, then to ASCII).

This should address the issue raised in issue #386 with exporting UTF-8
sequences to some message networks.
parent 4132f4bb
Pipeline #2966 passed with stage
in 9 minutes and 49 seconds
......@@ -4824,6 +4824,13 @@ void export_echomail(const char* sub_code, const nodecfg_t* nodecfg, bool rescan
if((scfg.sub[subnum]->misc & SUB_ASCII) && smb_msg_is_utf8(&msg)) {
utf8_to_cp437_inplace(, ascii_str(;
utf8_to_cp437_inplace(hdr.from), ascii_str(hdr.from);
utf8_to_cp437_inplace(hdr.subj), ascii_str(hdr.subj);
lprintf(LOG_DEBUG,"Exporting %s message #%u from %s to %s in area: %s"
,scfg.sub[subnum]->code, msg.hdr.number, msg.from,, tag);
fmsgbuflen=strlen((char *)buf)+4096; /* over alloc for kludge lines */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment