From fa91e9074a14a892557b760619f9ad2729bd5cd2 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Thu, 4 Apr 2024 18:00:47 -0700
Subject: [PATCH] Default FTN charset to CP437 (not ASCII) for QWK-imported
 messages

A QWKnet tagline usually contains CP437 character 254 and if/when appended to
a message during export, would "convert" the message to CP437 thus making the
"ASCII" charset advertisement incorrect.

If a FIDO CHARSET value was already specified (e.g. in HEADERS.DAT), that
value will (still) not be overridden. So the *original* import via QWK (before
it gets exported to a QWKnet) is where this change will take effect.

Fix for issue #741
---
 src/sbbs3/qwktomsg.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/sbbs3/qwktomsg.cpp b/src/sbbs3/qwktomsg.cpp
index 2ea2c6ddff..dbe7035700 100644
--- a/src/sbbs3/qwktomsg.cpp
+++ b/src/sbbs3/qwktomsg.cpp
@@ -483,8 +483,6 @@ bool sbbs_t::qwk_import_msg(FILE *qwk_fp, char *hdrblk, uint blocks
 		const char* charset = FIDO_CHARSET_CP437;
 		if(msg->hdr.auxattr & MSG_HFIELDS_UTF8)
 			charset = FIDO_CHARSET_UTF8;
-		else if(str_is_ascii(body) && str_is_ascii(tail))
-			charset = FIDO_CHARSET_ASCII;
 		smb_hfield_str(msg, FIDOCHARSET, charset);
 	}
 
-- 
GitLab