Re: Lower case to upper case german ess-zet



On Tue, Sep 11, 2007 at 06:12:53PM +0000, Luis Ramirez wrote:
I have a problem converting german ess-zet ("ß") from lower to uppercase
when using g_unichar_toupper, but it works fine using g_utf8_strup.
Using g_unichar_toupper I get a 0 as result.

You should not, both according to my reading of GLib source
code and experiment.  Since the uppercase is not
repesentable with a signle character, you should get the
input character back from g_unichar_toupper(), exactly as
the documentation states -- and this is also what I observe.

Here it is a sample. The output is:

Note embedding these things in mail makes them subject to
abritrary reencoding and can result in recipients trying
entirely different code if they are not very careful -- use
\xc3\x9f representation.

g_unichar_toupper. Lower:'ß', Upper:''
g_utf8_strup. Lower:'ß', Upper:'SS'

I get

g_unichar_toupper. Lower:'ß', Upper:'ß'
g_utf8_strup. Lower:'ß', Upper:'SS'

as expected.  Perhaps a too old GLib?

Yeti

--
http://gwyddion.net/



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