Fixed ISO to latin conversion
This commit is contained in:
parent
54d160f575
commit
7f90a6d53d
@ -12,6 +12,10 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- 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.
|
||||
|
||||
- When you change mail to the UUCP gate and InternetRFCBody is on
|
||||
GoldED+ WILL insert new To: line in the message, stripping old one.
|
||||
|
||||
|
@ -171,7 +171,7 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
||||
if(not inmime) {
|
||||
if(msg->charset) {
|
||||
bp = stpcpy(bp, "=?");
|
||||
if(strneql(msg->charset, "latin", 5)) {
|
||||
if(strnieql(msg->charset, "latin", 5)) {
|
||||
bp = Latin2ISO(bp, msg->charset);
|
||||
}
|
||||
else {
|
||||
@ -497,7 +497,7 @@ void DoKludges(int mode, GMsg* msg, bool attronly) {
|
||||
char encoding[100];
|
||||
bool isusascii = striinc("ASCII", msg->charset);
|
||||
bool isqp = not isusascii and IsQuotedPrintable(msg->charset);
|
||||
if(strneql(msg->charset, "latin", 5))
|
||||
if(strnieql(msg->charset, "latin", 5))
|
||||
Latin2ISO(encoding, msg->charset);
|
||||
else if(isusascii)
|
||||
strcpy(encoding, "us-ascii");
|
||||
|
@ -2733,7 +2733,7 @@ char *Latin2ISO(char *iso_encoding, const char *latin_encoding) {
|
||||
char *ISO2Latin(char *latin_encoding, const char *iso_encoding) {
|
||||
|
||||
static const char *latinno[] = { NULL, "1", "2", "3", "4", NULL, NULL, NULL, NULL, "5", "6", NULL, NULL, "7", "8", "9" };
|
||||
int chsno = atoi(iso_encoding+9);
|
||||
int chsno = atoi(strstr(iso_encoding, "8859")+5);
|
||||
chsno = chsno > sizeof(latinno)/sizeof(const char *) ? 0 : chsno;
|
||||
if(latinno[chsno] == NULL)
|
||||
return strxmerge(latin_encoding, 12, iso_encoding, NULL);
|
||||
|
Reference in New Issue
Block a user