Mailing List Archive



Back to the month index Back to the list index

Bernd Melchers (melchers@cis.fu-berlin.de)
Mon, 14 Apr 1997 14:27:32 +0200 (MEST)


Message-Id: <m0wGkr7-008tHfC@Cobra.CIS.FU-Berlin.DE>
From: melchers@cis.fu-berlin.de (Bernd Melchers)
Subject: Re: [mSQL] Umlauts in CLIKE
Date: Mon, 14 Apr 1997 14:27:32 +0200 (MEST)

'Jochen Wiedmann wrote:'
>
> Hello,
>
> I noticed that CLIKE has problems with german Umlauts. Ok, I said,
> lets introduce a setlocale call into the source. I've been never
> working with setlocale(), so I wrote a little test program:
>
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> #include <locale.h>
> int main(int argc, char* argv[]) {
> setlocale(LC_CTYPE, (argc>1) ? argv[0] : "");
> printf("Lower case: %c, converted to upper case: %c\n",
> '\344', toupper('\344'));
> }
>
> When I compiled this and tried "./test de" or "./test iso_8859_1"
> I noticed no conversion happening, although my locale seems
> properly installed, at least "dumpcs" works fine (Solaris 2).
>
>
> Any suggestions?

write
(argc>1) ? argv[1] : ""
instead of
(argc>1) ? argv[0] : ""

Ciao
Bernd

-- 
Bernd Melchers             | melchers@CIS.FU-Berlin.DE
Freie Universitaet Berlin  | "We don't write software, we compose it."
CIS - Center for Information Services
for more information see http://www.chemie.fu-berlin.de/~melchers

-------------------------------------------------------------------------- To remove yourself from the Mini SQL mailing list send a message containing "unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing "info msql-list" to majordomo@bunyip.com for info on monthly archives of the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!