mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
Fix corner-cases of upper/lowercase conversion. (#418217, Denis Jacquerye)
2007-03-22 Matthias Clasen <mclasen@redhat.com> * glib/guniprop.c: Fix corner-cases of upper/lowercase conversion. (#418217, Denis Jacquerye) svn path=/trunk/; revision=5433
This commit is contained in:
parent
033e54e8a4
commit
7296a34571
@ -1,3 +1,8 @@
|
|||||||
|
2007-03-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c: Fix corner-cases of upper/lowercase conversion.
|
||||||
|
(#418217, Denis Jacquerye)
|
||||||
|
|
||||||
2007-03-22 Chris Wilson <chris@chris-wilson.co.uk>
|
2007-03-22 Chris Wilson <chris@chris-wilson.co.uk>
|
||||||
|
|
||||||
* glib/gkeyfile.c: Track whether the last key=value pair in a group
|
* glib/gkeyfile.c: Track whether the last key=value pair in a group
|
||||||
|
@ -546,16 +546,14 @@ g_unichar_toupper (gunichar c)
|
|||||||
if (val >= 0x1000000)
|
if (val >= 0x1000000)
|
||||||
{
|
{
|
||||||
const gchar *p = special_case_table + val - 0x1000000;
|
const gchar *p = special_case_table + val - 0x1000000;
|
||||||
return g_utf8_get_char (p);
|
val = g_utf8_get_char (p);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Some lowercase letters, e.g., U+000AA, FEMININE ORDINAL INDICATOR,
|
/* Some lowercase letters, e.g., U+000AA, FEMININE ORDINAL INDICATOR,
|
||||||
* do not have an uppercase equivalent, in which case val will be
|
* do not have an uppercase equivalent, in which case val will be
|
||||||
* zero. */
|
* zero.
|
||||||
|
*/
|
||||||
return val ? val : c;
|
return val ? val : c;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (t == G_UNICODE_TITLECASE_LETTER)
|
else if (t == G_UNICODE_TITLECASE_LETTER)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@ -629,9 +627,11 @@ g_unichar_totitle (gunichar c)
|
|||||||
|| title_table[i][2] == c)
|
|| title_table[i][2] == c)
|
||||||
return title_table[i][0];
|
return title_table[i][0];
|
||||||
}
|
}
|
||||||
return (TYPE (c) == G_UNICODE_LOWERCASE_LETTER
|
|
||||||
? ATTTABLE (c >> 8, c & 0xff)
|
if (TYPE (c) == G_UNICODE_LOWERCASE_LETTER)
|
||||||
: c);
|
return g_unichar_toupper (c);
|
||||||
|
|
||||||
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user