From a25d536954b782826bc4b6aa7d30bafbd137ee60 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Windows 11)" <rob@synchro.net> Date: Tue, 13 Feb 2024 20:36:33 -0800 Subject: [PATCH] The "Soft-CR" strip/expansion feature is N/A for UTF-8 editors Updated help text for "Support UTF-8 Encoding" for external editors. --- src/sbbs3/scfg/scfgxtrn.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/sbbs3/scfg/scfgxtrn.c b/src/sbbs3/scfg/scfgxtrn.c index fdade3f7b3..b2068175fd 100644 --- a/src/sbbs3/scfg/scfgxtrn.c +++ b/src/sbbs3/scfg/scfgxtrn.c @@ -1882,20 +1882,24 @@ void xedit_cfg() snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Expand Line Feeds to CRLF" ,cfg.xedit[i]->misc&EXPANDLF ? "Yes":"No"); const char* p; - switch(cfg.xedit[i]->soft_cr) { - case XEDIT_SOFT_CR_EXPAND: - p = "Convert to CRLF"; - break; - case XEDIT_SOFT_CR_STRIP: - p = "Strip"; - break; - case XEDIT_SOFT_CR_RETAIN: - p = "Retain"; - break; - default: - case XEDIT_SOFT_CR_UNDEFINED: - p = "Unspecified"; - break; + if(cfg.xedit[i]->misc&XTRN_UTF8) { + p = "N/A"; + } else { + switch(cfg.xedit[i]->soft_cr) { + case XEDIT_SOFT_CR_EXPAND: + p = "Convert to CRLF"; + break; + case XEDIT_SOFT_CR_STRIP: + p = "Strip"; + break; + case XEDIT_SOFT_CR_RETAIN: + p = "Retain"; + break; + default: + case XEDIT_SOFT_CR_UNDEFINED: + p = "Unspecified"; + break; + } } snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Handle Soft CRs", p); snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Strip FidoNet Kludges" @@ -2170,6 +2174,8 @@ void xedit_cfg() } break; case 12: + if(cfg.xedit[i]->misc & XTRN_UTF8) + break; // N/A k = cfg.xedit[i]->soft_cr; strcpy(opt[0],"Unspecified"); strcpy(opt[1],"Convert to CRLF"); @@ -2224,8 +2230,9 @@ void xedit_cfg() uifc.helpbuf= "`Support UTF-8 Encoding:`\n" "\n" - "If this editor can detect and support UTF-8 terminals, set this option\n" - "to `Yes`." + "If this editor can handle UTF-8 encoded message text and header fields\n" + "and can detect and support UTF-8 terminal input and output, set this\n" + "option to `Yes`." ; k=uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0 ,"Support UTF-8 Encoding" -- GitLab