verifying unicode locale support - Mailing list pgsql-general

From Holger Klawitter
Subject verifying unicode locale support
Date
Msg-id 200404131111.16961.lists@klawitter.de
Whole thread Raw
Responses Re: verifying unicode locale support
Re: verifying unicode locale support
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

triggered by the recent questions about sorting, I started digging into my
problems with upper('ä')='ä' when using LC_CTYPE and LANG = de_DE.UTF-8.

I have checked with Java (toUpperCase()) and C (see attached program, might
help others) that my locale is working, but postgres (initdb and postmaster
running with LANG=de_DE.utf8, -E UNICODE) still insists that upper('ä')
equals 'ä'. What else can be wrong?

Mit freundlichem Gruß / With kind regards
    Holger Klawitter
- --
lists <at> klawitter <dot> de

- ------snip------
#include <stdio.h>
#include <locale.h>
#include <wchar.h>

int main()
{
    if (!setlocale(LC_CTYPE, "")) {
        fprintf(stderr, "Can't set the specified locale! "
                        "Check LANG, LC_CTYPE, LC_ALL.\n");
        return 1;
    }
    wchar_t* text = L"ä";
    printf( "is: towupper(%x) = %x\n", text[0], towupper(text[0]) );
    return 0;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAe6601Xdt0HKSwgYRAvtlAJ9nfZHVHLcDeCCok/ylgr1jtZrXBQCff29h
bKiclwE2ahspLQZSBKJWIuo=
=1IaE
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: "Development - multi.art.studio"
Date:
Subject: performance problem aftrer update from 7.1 to 7.4.2
Next
From: Holger Klawitter
Date:
Subject: Re: Filesystem vs. Postgres for images