LatinToLocal will work only for search

This commit is contained in:
Ianos Gnatiuc 2005-11-01 23:14:55 +00:00
parent 83a8fc9f2f
commit da408e1a01
5 changed files with 29 additions and 23 deletions

View File

@ -1424,7 +1424,7 @@ XLATEXPORT IBMPC
XLATLOCALSET IBMPC
// Used to translate latin A-Za-z to local charset if one of neighbours
// is from local charset too.
// is from local charset too. Will work only for search.
// ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
;LatinToLocal ABCDEFG<46>IJKLMNOPQRSTUVWXYZabcdefghijklmnoàqrstuvwxãz ;cp866 - H,p,y

View File

@ -1671,7 +1671,7 @@ XlatCharSet CP850 ASCII 850_ASC.chs
// ќв®в ЄҐ©ў®а¤ Ї®§ў®«пҐв ¤Ґ« вм ®Ўа в­го § ¬Ґ­г « вЁ­бЄЁе ЎгЄў ­  агббЄЁҐ.
// ‡ ¬Ґ­  Ўг¤Ґв ¤Ґ« вмбп в®«мЄ® вҐе « вЁ­бЄЁе ЎгЄў, зв® Ё¬Ґов Ї® б®бҐ¤бвўг
// <EFBFBD>ד×¢כ «®× «ל­®© ×®¤¨א®¢×¨.
// ¡ד×¢כ «®× «ל­®© ×®₪¨א®¢×¨. <20> ¡®ג ¥ג ג®«ל×® ₪«ן ¯®¨ב× .
// ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
;LatinToLocal ABCDEFGЌIJKLMNOPQRSTUVWXYZabcdefghijklmnoаqrstuvwxгz ;cp866 - H,p,y

View File

@ -19,7 +19,7 @@ ______________________________________________________________________
+ New config file token LatinToLocal.
Used to translate latin A-Za-z to local charset if one of neighbours
is from local charset too.
is from local charset too. Will work only for search.
+ New config file token AreaRecycleBin <area>. GoldEd will move deleted
messages to <area>, if this token is defined.

View File

@ -27,6 +27,10 @@
#include <golded.h>
#include <gesrch.h>
#if defined(__USE_ALLOCA__)
#include <malloc.h>
#endif
// ------------------------------------------------------------------
@ -117,7 +121,28 @@ bool FindString(GMsg* msg, const char* prompt, int what) {
w_progress(MODE_UPDATE, C_INFOW, AA->lastread(), AA->Msgn.Count(), LNG->AdvancedSearch);
bool success = false;
if(AA->LoadMsg(msg, AA->Msgn.CvtReln(AA->lastread()), margin)) {
if(AA->LoadMsg(msg, AA->Msgn.CvtReln(AA->lastread()), margin))
{
if (CFG->latin2local)
{
Latin2Local(msg->by);
Latin2Local(msg->to);
if (!msg->attr.frq() && !msg->attr.att() && !msg->attr.urq())
Latin2Local(msg->re);
for (Line *ln = msg->lin; ln; ln = ln->next)
{
#if defined(__USE_ALLOCA__)
char *temp = (char *)alloca(ln->txt.length()+1);
#else
__extension__ char temp[ln->txt.length()+1];
#endif
strcpy(temp, ln->txt.c_str());
Latin2Local(temp);
ln->txt = temp;
}
}
// If hit, search again current mail without shortcircuit evaluation
success = srchmgr.search(msg, false, true);

View File

@ -110,25 +110,6 @@ int Area::LoadMsg(GMsg* msg, uint32_t msgno, int margin, int mode) {
msg->TextToLines(margin);
if (!mode && !AA->attr().hex())
{
Latin2Local(msg->by);
Latin2Local(msg->to);
if (!msg->attr.frq() && !msg->attr.att() && !msg->attr.urq())
Latin2Local(msg->re);
for (Line *ln = msg->lin; ln; ln = ln->next)
#ifdef _MSC_VER
Latin2Local(ln->txt.begin());
#else
{ char*str=strdup(ln->txt.data());
Latin2Local(str);
ln->txt.assign(str);
}
#endif
}
return true;
}
return false;