Update g_unichar_iswide to Unicode 4.0 (#113404).
authorNoah Levitt <nlevitt@columbia.edu>
Thu, 22 May 2003 19:48:45 +0000 (19:48 +0000)
committerNoah Levitt <nlevitt@src.gnome.org>
Thu, 22 May 2003 19:48:45 +0000 (19:48 +0000)
2003-05-22  Noah Levitt  <nlevitt@columbia.edu>

* glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/guniprop.c

index 5c8b6e6..476d9d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 5c8b6e6..476d9d6 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 5c8b6e6..476d9d6 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 5c8b6e6..476d9d6 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 5c8b6e6..476d9d6 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 5c8b6e6..476d9d6 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-22  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
+
 2003-05-21  Noah Levitt  <nlevitt@columbia.edu>
 
        * glib/guniprop.c: Fix obscure typo in case conversion routine
index 04fb0a3..0740b3c 100644 (file)
@@ -331,16 +331,19 @@ gboolean
 g_unichar_iswide (gunichar c)
 {
   if (c < 0x1100)
-    return 0;
-
-  return ((c >= 0x1100 && c <= 0x115f)    /* Hangul Jamo */
-         || (c >= 0x2e80 && c <= 0xa4cf && (c & ~0x0011) != 0x300a &&
-             c != 0x303f)                 /* CJK ... Yi */
-         || (c >= 0xac00 && c <= 0xd7a3)  /* Hangul Syllables */
-         || (c >= 0xf900 && c <= 0xfaff)  /* CJK Compatibility Ideographs */
-         || (c >= 0xfe30 && c <= 0xfe6f)  /* CJK Compatibility Forms */
-         || (c >= 0xff00 && c <= 0xff5f)  /* Fullwidth Forms */
-         || (c >= 0xffe0 && c <= 0xffe6));
+    return FALSE;
+
+  return (c <= 0x115f  /* Hangul Jamo init. consonants */ 
+          || c == 0x2329 || c == 0x232a     /* angle brackets */
+          || (c >= 0x2e80 && c <= 0xa4cf && (c < 0x302a || c > 0x302f) 
+              && c != 0x303f && c != 0x3099 && c!= 0x309a) /* CJK ... Yi */
+          || (c >= 0xac00 && c <= 0xd7a3)   /* Hangul Syllables */
+          || (c >= 0xf900 && c <= 0xfaff)   /* CJK Compatibility Ideographs */
+          || (c >= 0xfe30 && c <= 0xfe6f)   /* CJK Compatibility Forms */
+          || (c >= 0xff00 && c <= 0xff60)   /* Fullwidth Forms */
+          || (c >= 0xffe0 && c <= 0xffe6)   /* Fullwidth Forms */
+          || (c >= 0x20000 && c <= 0x2fffd) /* CJK extra stuff */
+          || (c >= 0x30000 && c <= 0x3fffd));
 }
 
 /**