Update g_unichar_iswide to Unicode 4.0 (#113404).

2003-05-22  Noah Levitt  <nlevitt@columbia.edu>

	* glib/guniprop.c: Update g_unichar_iswide to Unicode 4.0 (#113404).
This commit is contained in:
Noah Levitt 2003-05-22 19:48:45 +00:00 committed by Noah Levitt
parent cd1e44fd2b
commit 8648811bc0
7 changed files with 36 additions and 9 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -331,16 +331,19 @@ gboolean
g_unichar_iswide (gunichar c)
{
if (c < 0x1100)
return 0;
return FALSE;
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 (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));
}
/**