Skip to content
Snippets Groups Projects
Commit 00afb97c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Improvements to UTF-8 capable external editor support

1. Add an 8th line to MSGINF (for SlyEdit): the character set expected
   (either "CP437", the default, or "UTF-8") based on the SCFG configuration
2. Don't apply "Soft-CR" (0x8D) stripping/expansion for UTF-8 editors
parent 23006c35
No related branches found
No related tags found
No related merge requests found
...@@ -154,7 +154,8 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin ...@@ -154,7 +154,8 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin
useron_xedit = 0; useron_xedit = 0;
for(l=i=0;buf[l] && i<maxlines;l++) { for(l=i=0;buf[l] && i<maxlines;l++) {
if((uchar)buf[l] == FIDO_SOFT_CR && useron_xedit) { if((uchar)buf[l] == FIDO_SOFT_CR && useron_xedit
&& !(cfg.xedit[useron_xedit-1]->misc & XTRN_UTF8)) {
i++; i++;
switch(cfg.xedit[useron_xedit-1]->soft_cr) { switch(cfg.xedit[useron_xedit-1]->soft_cr) {
case XEDIT_SOFT_CR_EXPAND: case XEDIT_SOFT_CR_EXPAND:
...@@ -847,6 +848,7 @@ void sbbs_t::editor_inf(int xeditnum, const char *to, const char* from, const ch ...@@ -847,6 +848,7 @@ void sbbs_t::editor_inf(int xeditnum, const char *to, const char* from, const ch
if((mode&WM_EXTDESC)==0 && tagfile!=NULL) if((mode&WM_EXTDESC)==0 && tagfile!=NULL)
fprintf(fp,"%s", tagfile); fprintf(fp,"%s", tagfile);
fprintf(fp,"\r\n"); fprintf(fp,"\r\n");
fprintf(fp,"%s\r\n", cfg.xedit[xeditnum]->misc & XTRN_UTF8 ? "UTF-8" : "CP437");
fclose(fp); fclose(fp);
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment