[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ISO-8859-11 supported. and compressed ConfigureNotify
From: |
Banlu Kemiyatorn |
Subject: |
ISO-8859-11 supported. and compressed ConfigureNotify |
Date: |
Sat, 19 Oct 2002 17:44:53 +0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408 |
Dear sirs,
1) It would be nice if I can have ISO 8859-11 supported in GNUstep.
A note that the implementation of initWithDelegate:display:name:
in XIMInputServer.m have to compare localeEncoding with "th_th"
and then set encoding to NSThaiStringEncoding but it said
// FIXME: Use [GSFontInfo +encodingForRegistry:encoding:]?
so I don't know if I should add that or this.
2) Is it possible to compress ConfigureNotify in XGServerEvent.m?
I have had a chance to test it on KDE and with opaque resizing
,compression can speed things up a lot. (Actually, the experiment was that
w/o compression, it was extremely too slow not usable at all.)
Best regards,
babyblink!
PS. For any Thai user if you really are existed and you are not me, th_TH
won't work by these patches, you have to edit XIMInputServer.m as the
explaination
above. But I've heard utf-8 work.
/* ISO_8859-11 to Unicode maping */
const unsigned int Thai_conv_base = 0xA0;
unichar Thai_char_to_uni_table[] =
{
0x00A0,
0x0E01,
0x0E02,
0x0E03,
0x0E04,
0x0E05,
0x0E06,
0x0E07,
0x0E08,
0x0E09,
0x0E0A,
0x0E0B,
0x0E0C,
0x0E0D,
0x0E0E,
0x0E0F,
0x0E10,
0x0E11,
0x0E12,
0x0E13,
0x0E14,
0x0E15,
0x0E16,
0x0E17,
0x0E18,
0x0E19,
0x0E1A,
0x0E1B,
0x0E1C,
0x0E1D,
0x0E1E,
0x0E1F,
0x0E20,
0x0E21,
0x0E22,
0x0E23,
0x0E24,
0x0E25,
0x0E26,
0x0E27,
0x0E28,
0x0E29,
0x0E2A,
0x0E2B,
0x0E2C,
0x0E2D,
0x0E2E,
0x0E2F,
0x0E30,
0x0E31,
0x0E32,
0x0E33,
0x0E34,
0x0E35,
0x0E36,
0x0E37,
0x0E38,
0x0E39,
0x0E3A,
0xFFFD,
0xFFFD,
0xFFFD,
0xFFFD,
0x0E3F,
0x0E40,
0x0E41,
0x0E42,
0x0E43,
0x0E44,
0x0E45,
0x0E46,
0x0E47,
0x0E48,
0x0E49,
0x0E4A,
0x0E4B,
0x0E4C,
0x0E4D,
0x0E4E,
0x0E4F,
0x2116,
0x0E51,
0x0E52,
0x0E53,
0x0E54,
0x0E55,
0x0E56,
0x0E57,
0x0E58,
0x0E59,
0x0E5A,
0x0E5B,
0xFFFD,
0xFFFD,
0xFFFD,
0xFFFD,
};
/* Unicode to ISO_8859-11 maping */
const unsigned int Thai_uni_to_char_table_size = 88;
_ucc_ Thai_uni_to_char_table[]=
{
{0x00A0,0xA0},
{0x0E01,0xA1},
{0x0E02,0xA2},
{0x0E03,0xA3},
{0x0E04,0xA4},
{0x0E05,0xA5},
{0x0E06,0xA6},
{0x0E07,0xA7},
{0x0E08,0xA8},
{0x0E09,0xA9},
{0x0E0A,0xAA},
{0x0E0B,0xAB},
{0x0E0C,0xAC},
{0x0E0D,0xAD},
{0x0E0E,0xAE},
{0x0E0F,0xAF},
{0x0E10,0xB0},
{0x0E11,0xB1},
{0x0E12,0xB2},
{0x0E13,0xB3},
{0x0E14,0xB4},
{0x0E15,0xB5},
{0x0E16,0xB6},
{0x0E17,0xB7},
{0x0E18,0xB8},
{0x0E19,0xB9},
{0x0E1A,0xBA},
{0x0E1B,0xBB},
{0x0E1C,0xBC},
{0x0E1D,0xBD},
{0x0E1E,0xBE},
{0x0E1F,0xBF},
{0x0E20,0xC0},
{0x0E21,0xC1},
{0x0E22,0xC2},
{0x0E23,0xC3},
{0x0E24,0xC4},
{0x0E25,0xC5},
{0x0E26,0xC6},
{0x0E27,0xC7},
{0x0E28,0xC8},
{0x0E29,0xC9},
{0x0E2A,0xCA},
{0x0E2B,0xCB},
{0x0E2C,0xCC},
{0x0E2D,0xCD},
{0x0E2E,0xCE},
{0x0E2F,0xCF},
{0x0E30,0xD0},
{0x0E31,0xD1},
{0x0E32,0xD2},
{0x0E33,0xD3},
{0x0E34,0xD4},
{0x0E35,0xD5},
{0x0E36,0xD6},
{0x0E37,0xD7},
{0x0E38,0xD8},
{0x0E39,0xD9},
{0x0E3A,0xDA},
{0x0E3F,0xDF},
{0x0E40,0xE0},
{0x0E41,0xE1},
{0x0E42,0xE2},
{0x0E43,0xE3},
{0x0E44,0xE4},
{0x0E45,0xE5},
{0x0E46,0xE6},
{0x0E47,0xE7},
{0x0E48,0xE8},
{0x0E49,0xE9},
{0x0E4A,0xEA},
{0x0E4B,0xEB},
{0x0E4C,0xEC},
{0x0E4D,0xED},
{0x0E4E,0xEE},
{0x0E4F,0xEF},
{0x0E50,0xF0},
{0x0E51,0xF1},
{0x0E52,0xF2},
{0x0E53,0xF3},
{0x0E54,0xF4},
{0x0E55,0xF5},
{0x0E56,0xF6},
{0x0E57,0xF7},
{0x0E58,0xF8},
{0x0E59,0xF9},
{0x0E5A,0xFA},
{0x0E5B,0xFB},
};
diff -u -r gnustep.old/core/base/Headers/gnustep/base/NSString.h
gnustep/core/base/Headers/gnustep/base/NSString.h
--- gnustep.old/core/base/Headers/gnustep/base/NSString.h 2002-10-19
17:06:07.000000000 +0700
+++ gnustep/core/base/Headers/gnustep/base/NSString.h 2002-10-17
23:05:29.000000000 +0700
@@ -83,8 +83,8 @@
NSISOHebrewStringEncoding = 55, // ISO-8859-8
NSISOLatin5StringEncoding = 57, // ISO-8859-9; Turkish
NSISOLatin6StringEncoding = 58, // ISO-8859-10; Nordic
-/* Possible future ISO-8859 additions
NSISOThaiStringEncoding = 59, // ISO-8859-11
+/* Possible future ISO-8859 additions
// ISO-8859-12
*/
NSISOLatin7StringEncoding = 61, // ISO-8859-13
diff -u -r gnustep.old/core/base/Source/NSString.m
gnustep/core/base/Source/NSString.m
--- gnustep.old/core/base/Source/NSString.m 2002-10-19 17:06:15.000000000
+0700
+++ gnustep/core/base/Source/NSString.m 2002-10-19 16:09:04.000000000 +0700
@@ -2484,7 +2484,8 @@
|| (encoding == NSNEXTSTEPStringEncoding)
|| (encoding == NSNonLossyASCIIStringEncoding)
|| (encoding == NSSymbolStringEncoding)
- || (encoding == NSISOCyrillicStringEncoding))
+ || (encoding == NSISOCyrillicStringEncoding)
+ || (encoding == NSISOThaiStringEncoding))
{
char t;
unsigned char *buff;
diff -u -r gnustep.old/core/base/Source/Unicode.m
gnustep/core/base/Source/Unicode.m
--- gnustep.old/core/base/Source/Unicode.m 2002-10-19 17:06:16.000000000
+0700
+++ gnustep/core/base/Source/Unicode.m 2002-10-18 20:16:11.000000000 +0700
@@ -43,6 +43,7 @@
#include "unicode/cop.h"
#include "unicode/decomp.h"
#include "unicode/gsm0338.h"
+#include "unicode/thai.h"
#ifdef HAVE_ICONV
#ifdef HAVE_GICONV_H
@@ -158,6 +159,7 @@
{NSISOHebrewStringEncoding, "NSISOHebrewStringEncoding","ISO-8859-8",0,0},
{NSISOLatin5StringEncoding, "NSISOLatin5StringEncoding","ISO-8859-9",0,0},
{NSISOLatin6StringEncoding, "NSISOLatin6StringEncoding","ISO-8859-10",0,0},
+ {NSISOThaiStringEncoding, "NSISOThaiStringEncoding","ISO-8859-11",1,1},
{NSISOLatin7StringEncoding, "NSISOLatin7StringEncoding","ISO-8859-13",0,0},
{NSISOLatin8StringEncoding, "NSISOLatin8StringEncoding","ISO-8859-14",0,0},
{NSISOLatin9StringEncoding, "NSISOLatin9StringEncoding","ISO-8859-15",0,0},
@@ -806,6 +808,11 @@
base = Latin2_conv_base;
table = Latin2_char_to_uni_table;
goto tables;
+
+ case NSISOThaiStringEncoding:
+ base = Thai_conv_base;
+ table = Thai_char_to_uni_table;
+ goto tables;
#if 0
case NSSymbolStringEncoding:
@@ -1268,6 +1274,12 @@
tsize = Latin2_uni_to_char_table_size;
goto tables;
+ case NSISOThaiStringEncoding:
+ base = (unichar)Thai_conv_base;
+ table = Thai_uni_to_char_table;
+ tsize = Thai_uni_to_char_table_size;
+ goto tables;
+
#if 0
case NSSymbolStringEncoding:
base = (unichar)Symbol_conv_base;
diff -u -r gnustep.old/core/gui/Source/GSFontInfo.m
gnustep/core/gui/Source/GSFontInfo.m
--- gnustep.old/core/gui/Source/GSFontInfo.m 2002-10-19 17:06:16.000000000
+0700
+++ gnustep/core/gui/Source/GSFontInfo.m 2002-10-19 17:00:33.000000000
+0700
@@ -201,6 +201,8 @@
return NSISOGreekStringEncoding;
else if ([encoding isEqualToString: @"8"])
return NSISOHebrewStringEncoding;
+ else if ([encoding isEqualToString: @"11"])
+ return NSISOThaiStringEncoding;
// Other latin encodings are currently not supported
}
else if ([registry isEqualToString: @"iso10646"])
- ISO-8859-11 supported. and compressed ConfigureNotify,
Banlu Kemiyatorn <=