Fixing few bugs for LatinToLocal

This commit is contained in:
Ianos Gnatiuc 2005-10-31 19:34:10 +00:00
parent 19274603a9
commit ad8b2a9d36
2 changed files with 10 additions and 4 deletions

View File

@ -1684,7 +1684,8 @@ void ScanKludges(GMsg* msg, int getvalue) {
void Latin2Local(char *str) void Latin2Local(char *str)
{ {
if (!CFG->latin2local) return; if (!CFG->latin2local || !str) return;
for (size_t i = 0; str[i]; i++) for (size_t i = 0; str[i]; i++)
{ {
byte chr = str[i]; byte chr = str[i];

View File

@ -108,15 +108,20 @@ int Area::LoadMsg(GMsg* msg, uint32_t msgno, int margin, int mode) {
return true; return true;
} }
msg->TextToLines(margin);
if (!mode && !AA->attr().hex()) if (!mode && !AA->attr().hex())
{ {
Latin2Local(msg->by); Latin2Local(msg->by);
Latin2Local(msg->to); Latin2Local(msg->to);
Latin2Local(msg->re);
Latin2Local(msg->txt); if (!msg->attr.frq() && !msg->attr.att() && !msg->attr.urq())
Latin2Local(msg->re);
for (Line *ln = msg->lin; ln; ln = ln->next)
Latin2Local(ln->txt.begin());
} }
msg->TextToLines(margin);
return true; return true;
} }
return false; return false;