Re: Lower case to upper case german ess-zet



On Thu, Sep 13, 2007 at 10:01:03PM +0200, Luis Ramirez wrote:
Thanks for your comments. I have entered the enclosed code in the begining
and I get:

Headers version: 2.12
    Lib version: 2.12

I have compiled the code in GNU/Linux and in Windows XP with Mingw and I get
the same version 2.12, and the same results.
Which version do you have used?

Installed:
  glib2-2.12.13-1.fc7.x86_64 (Fedora 7 RPM)

Reading code of:
  svn trunk

In http://svn.gnome.org/viewcvs/glib/trunk/glib/guniprop.c?annotate=5713
line 575 you can see what happens when the character is
lowercase (line 570) and its uppercase counterpart is
a number >= 0x1000000 (line 573).

These contions are true for sharp s (U+00DF) as you can see
in http://svn.gnome.org/viewcvs/glib/trunk/glib/gunichartables.h?annotate=4897
line 117 (G_UNICODE_LOWERCASE_LETTER) and line 9484 (the
0x1000000 value).

Since the uppercase value is 0x1000000, p will point to the
first entry of special_case_table in gunichartables.h, line
11978:

  "\x00\x53\x53\x00\x53\x73\0" /* offset 0 */

It starts with \x00 (single-char uppercase does not exist),
therefore val at line 576 of guniprop.c becomes 0.  And in
this case the original character is returned at line 582.

The code was changed on Thu Mar 22 09:11:27 2007 UTC, so if
your GLib is older than that (i.e. a stable release older
than 2.12.12), it's too old.

Yeti

--
http://gwyddion.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]