From 9d58bafa3e086a32b4828ba8d3f7cdf5e94f3ec4 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Tue, 30 Oct 2001 11:18:44 +0000 Subject: [PATCH] Externutils/charset fixes --- docs/notework.txt | 5 +++++ golded3/gedoit.cpp | 3 ++- golded3/geline.cpp | 2 +- golded3/gepost.cpp | 7 +++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 57a6082..e2d9d74 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,11 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed improper charset conversion when replying on message without + charset between areas with different Xlatimport. + +- Fixed externutils/external editor with freshly created messages. + - Fixed bug in Latin-x to ISO-8859-x converter, now charset in Internet mail should be properly specifyed as ISO rather than as Latin. diff --git a/golded3/gedoit.cpp b/golded3/gedoit.cpp index 8a217d2..847d3da 100644 --- a/golded3/gedoit.cpp +++ b/golded3/gedoit.cpp @@ -67,7 +67,8 @@ void SaveLines(int mode, const char* savefile, GMsg* msg, int margin, bool clip) } } #else - AA->LoadMsg(msg, msg->msgno, margin); // reload message + if(mode == MODE_WRITE) + AA->LoadMsg(msg, msg->msgno, margin); // reload message TemplateToText(((mode == MODE_WRITE) and prnheader) ? ((prnheader & WRITE_ONLY_HEADER) ? MODE_HEADER : MODE_WRITEHEADER) : MODE_WRITE, msg, msg, AA->WTpl(), CurrArea); msg->attr.tou1(); msg->TextToLines(margin); diff --git a/golded3/geline.cpp b/golded3/geline.cpp index 39c0e5a..fec9155 100644 --- a/golded3/geline.cpp +++ b/golded3/geline.cpp @@ -441,7 +441,7 @@ char* strxmimecpy(char* dest, const char* source, int level, int size, bool dete if(detect) { if(table == -1) - LoadCharset(CFG->xlatimport, CFG->xlatlocalset); + LoadCharset(AA->Xlatimport(), CFG->xlatlocalset); else LoadCharset(CFG->xlatcharset[table].imp, CFG->xlatcharset[table].exp); } diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index 5bb1126..3465d8d 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -558,6 +558,11 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg* status = MODE_QUIT; } } + if(status != MODE_QUIT) { + LoadCharset("N/A", "N/A"); + strcpy(stpcpy(msg->charset, CFG->xlatlocalset), " 2"); + msg->charsetlevel = 2; + } } else if(forwstat == NO and (EDIT->Internal() or not *EDIT->External())) { w_info(LNG->Wait); @@ -830,6 +835,8 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { switch(mode) { case MODE_QUOTE: case MODE_REPLYCOMMENT: + if(CurrArea != OrigArea) + AA->SetXlatimport(AL.AreaIdToPtr(OrigArea)->Xlatimport()); omsg->attr.tou0(); omsg->TextToLines(-CFG->quotemargin, false); if(ignore_replyto)