Fixed charset level detection. Text will not be translate if level > 2.
This commit is contained in:
parent
af3df3ca44
commit
0b3e293fe2
@ -10,6 +10,8 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Fixed charset level detection. Text will not be translate if level > 2.
|
||||||
|
|
||||||
- Placed AKAMatchManually after all aka matching logic.
|
- Placed AKAMatchManually after all aka matching logic.
|
||||||
|
|
||||||
- Fixed buffer overun for too wide menus.
|
- Fixed buffer overun for too wide menus.
|
||||||
|
@ -140,8 +140,11 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
|||||||
const char* lp;
|
const char* lp;
|
||||||
char* temp_src = (char*)throw_malloc(4096);
|
char* temp_src = (char*)throw_malloc(4096);
|
||||||
|
|
||||||
if(*msg->charset) {
|
if(*msg->charset)
|
||||||
if((msg->charsetlevel&3) and ChsTP) {
|
{
|
||||||
|
int level = msg->charsetlevel;
|
||||||
|
if (((level == 1) || (level == 2)) && ChsTP)
|
||||||
|
{
|
||||||
char chln, *d = temp_src;
|
char chln, *d = temp_src;
|
||||||
|
|
||||||
for(uint len = 0; *s; s++) {
|
for(uint len = 0; *s; s++) {
|
||||||
|
@ -1856,7 +1856,9 @@ char* XlatStr(char* dest, const char* src, int level, Chs* chrtbl, int qpencoded
|
|||||||
defaultchardo:
|
defaultchardo:
|
||||||
dochar = *sptr++;
|
dochar = *sptr++;
|
||||||
chardo:
|
chardo:
|
||||||
if((level&3) and chrs) { // Translate level 1 and 2
|
// Translate level 1 and 2
|
||||||
|
if (((level == 1) || (level == 2)) && chrs)
|
||||||
|
{
|
||||||
tptr = (char*)chrs[(byte)dochar];
|
tptr = (char*)chrs[(byte)dochar];
|
||||||
clen = *tptr++;
|
clen = *tptr++;
|
||||||
while(clen--)
|
while(clen--)
|
||||||
@ -2067,8 +2069,11 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
qptr = qbuf;
|
qptr = qbuf;
|
||||||
reflow = false;
|
reflow = false;
|
||||||
// Insert previous quotestring
|
// Insert previous quotestring
|
||||||
for(n=0; n<qlen; n++) {
|
for(n=0; n<qlen; n++)
|
||||||
if((level&3) and ChsTP) { // Translate level 1 and 2
|
{
|
||||||
|
// Translate level 1 and 2
|
||||||
|
if (((level == 1) || (level == 2)) && ChsTP)
|
||||||
|
{
|
||||||
tptr = (char*)ChsTP[(byte)(*qptr++)];
|
tptr = (char*)ChsTP[(byte)(*qptr++)];
|
||||||
chln = *tptr++;
|
chln = *tptr++;
|
||||||
while(chln--) {
|
while(chln--) {
|
||||||
@ -2510,7 +2515,9 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
defaultchardo:
|
defaultchardo:
|
||||||
dochar = *ptr++;
|
dochar = *ptr++;
|
||||||
chardo:
|
chardo:
|
||||||
if((level&3) and ChsTP) { // Translate level 1 and 2
|
// Translate level 1 and 2
|
||||||
|
if (((level == 1) || (level == 2)) && ChsTP)
|
||||||
|
{
|
||||||
tptr = (char*)ChsTP[(byte)dochar];
|
tptr = (char*)ChsTP[(byte)dochar];
|
||||||
chln = *tptr++;
|
chln = *tptr++;
|
||||||
while(chln--) {
|
while(chln--) {
|
||||||
|
Reference in New Issue
Block a user