# HG changeset patch # User Yoshiki Yazawa # Date 1219271725 0 # Node ID ac9d95f61e7cdcf4c463c8846c9921b0912f7a3b # Parent 05fe17b2ee55bfda6223b7ba46863bf5d6212fab changed encoding for libpurple/util.c to utf-8. diff -r 05fe17b2ee55 -r ac9d95f61e7c libpurple/util.c --- a/libpurple/util.c Wed Aug 20 22:13:29 2008 +0000 +++ b/libpurple/util.c Wed Aug 20 22:35:25 2008 +0000 @@ -4794,33 +4794,33 @@ switch(*(ucs+i)){ case 0x00: switch(*(ucs+i+1)){ - case 0xa2: // ¡ñ + case 0xa2: // ¢ *(ucs+i) = 0xff; *(ucs+i+1) = 0xe0; break; - case 0xa3: // ¡ò + case 0xa3: // £ *(ucs+i) = 0xff; *(ucs+i+1) = 0xe1; break; - case 0xac: // ¢Ì + case 0xac: // ¬ *(ucs+i) = 0xff; *(ucs+i+1) = 0xe2; break; } break; - case 0x20: // ¡Â + case 0x20: // ‖ if(*(ucs+i+1) == 0x16){ *(ucs+i) = 0x22; *(ucs+i+1) = 0x25; } break; - case 0x22: // ¡Ý + case 0x22: // − if(*(ucs+i+1) == 0x12){ *(ucs+i) = 0xff; *(ucs+i+1) = 0x0d; } break; - case 0x30: // ¡Á + case 0x30: // 〜 if(*(ucs+i+1) == 0x1c){ *(ucs+i) = 0xff; *(ucs+i+1) = 0x5e; @@ -4850,7 +4850,7 @@ switch(*(ucs+i)){ case 0x22: switch(*(ucs+i+1)){ - case 0x25: // ¡Â + case 0x25: // ‖ *(ucs+i) = 0x20; *(ucs+i+1) = 0x16; break; @@ -4858,23 +4858,23 @@ break; case 0xff: switch(*(ucs+i+1)){ - case 0x0d: // ¡Ý + case 0x0d: // − *(ucs+i) = 0x22; *(ucs+i+1) = 0x12; break; - case 0x5e: // ¡Á + case 0x5e: // 〜 *(ucs+i) = 0x30; *(ucs+i+1) = 0x1c; break; - case 0xe0: // ¡ñ + case 0xe0: // ¢ *(ucs+i) = 0x00; *(ucs+i+1) = 0xa2; break; - case 0xe1: // ¡ò + case 0xe1: // £ *(ucs+i) = 0x00; *(ucs+i+1) = 0xa3; break; - case 0xe2: // ¢Ì + case 0xe2: // ¬ *(ucs+i) = 0x00; *(ucs+i+1) = 0xac; break; @@ -4918,7 +4918,7 @@ switch(*(utf+i)){ case 0xe2: if(*(utf+i+1) == 0x88) { - if(*(utf+i+2) == 0xa5) { // ¡Â + if(*(utf+i+2) == 0xa5) { // ‖ *(utf+i) = 0xe2; *(utf+i+1) = 0x80; *(utf+i+2) = 0x96; @@ -4928,14 +4928,14 @@ case 0xef: switch(*(utf+i+1)){ case 0xbc: - if(*(utf+i+2) == 0x8d) { // ¡Ý + if(*(utf+i+2) == 0x8d) { // − *(utf+i) = 0xe2; *(utf+i+1) = 0x88; *(utf+i+2) = 0x92; } break; case 0xbd: - if(*(utf+i+2) == 0x9e) { // ¡Á + if(*(utf+i+2) == 0x9e) { // 〜 *(utf+i) = 0xe3; *(utf+i+1) = 0x80; *(utf+i+2) = 0x9c; @@ -4943,21 +4943,21 @@ break; case 0xbf: switch(*(utf+i+2)){ - case 0xa0: // ¡ñ + case 0xa0: // ¢ *(utf+i) = 0xc2; *(utf+i+1) = 0xa2; memmove(utf+i+2, utf+i+3, len-i-3); //shorten by 1byte bytes--; break; - case 0xa1: // ¡ò + case 0xa1: // £ *(utf+i) = 0xc2; *(utf+i+1) = 0xa3; memmove(utf+i+2, utf+i+3, len-i-3); //shorten by 1byte bytes--; break; - case 0xa2: // ¢Ì + case 0xa2: // ¬ *(utf+i) = 0xc2; *(utf+i+1) = 0xac; memmove(utf+i+2, utf+i+3, @@ -5010,21 +5010,21 @@ switch(*(utf+i)){ case 0xc2: switch(*(utf+i+1)){ - case 0xa2: // ¡ñ + case 0xa2: // ¢ *(utf+i) = 0xef; *(utf+i+1) = 0xbf; memmove(utf+i+3, utf+i+2, bytes-i-2); *(utf+i+2) = 0xa0; bytes++; break; - case 0xa3: // ¡ò + case 0xa3: // £ *(utf+i) = 0xef; *(utf+i+1) = 0xbf; memmove(utf+i+3, utf+i+2, bytes-i-2); *(utf+i+2) = 0xa1; bytes++; break; - case 0xac: // ¢Ì + case 0xac: // ¬ *(utf+i) = 0xef; *(utf+i+1) = 0xbf; memmove(utf+i+3, utf+i+2, bytes-i-2); @@ -5035,14 +5035,14 @@ break; case 0xe2: switch(*(utf+i+1)){ - case 0x80: // ¡Â + case 0x80: // ‖ if(*(utf+i+2) == 0x96){ *(utf+i) = 0xe2; *(utf+i+1) = 0x88; *(utf+i+2) = 0xa5; } break; - case 0x88: // ¡Ý + case 0x88: // − if(*(utf+i+1) == 0x92){ *(utf+i) = 0xef; *(utf+i+1) = 0xbc; @@ -5051,7 +5051,7 @@ break; } break; - case 0xe3: // ¡Á + case 0xe3: // 〜 if(*(utf+i+1) == 0x80){ if(*(utf+i+2) == 0x9c){ *(utf+i) = 0xef;