Your message dated Mon, 8 May 2000 13:52:33 -0400
with message-id <[EMAIL PROTECTED]>
and subject line [EMAIL PROTECTED]: Bug#63717: isalpha()/toupper() functions do 
not work for non-ASCII characters]
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 7 May 2000 16:08:26 +0000
Received: (qmail 19776 invoked from network); 7 May 2000 16:08:25 -0000
Received: from gnu.in-berlin.de (192.109.42.4)
  by master.debian.org with SMTP; 7 May 2000 16:08:25 -0000
Received: from hirsch.in-berlin.de ([EMAIL PROTECTED] [192.109.42.6])
        by gnu.IN-Berlin.DE (8.9.3/8.9.3) with ESMTP id SAA10770
        for <[EMAIL PROTECTED]>; Sun, 7 May 2000 18:08:24 +0200 (CEST)
        (envelope-from [EMAIL PROTECTED])
Received: by hirsch.in-berlin.de (Smail3.2)
          id <m12oTbT-000ghKC>; Sun, 7 May 2000 18:08:23 +0200 (CEST)
Received: from srittau by moby.jroger.in-berlin.de with local (Exim 3.12 #1 
(Debian))
        id 12oTXH-0002Ch-00; Sun, 07 May 2000 18:04:03 +0200
From: srittau <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: isalpha()/toupper() functions do not work for non-ASCII characters
X-Reportbug-Version: 0.54
X-Mailer: reportbug 0.54
Date: Sun, 07 May 2000 18:04:03 +0200
Message-Id: <[EMAIL PROTECTED]>

Package: libc6
Version: 2.1.3-10
Severity: normal

The is*() and toupper()/tolower() functions do not work on non-ASCII
characters, even if LC_CTYPE etc. are set to the correct language used:

-----------------------------------------------------------------------

[EMAIL PROTECTED]:~$ locale
LANG=de_DE
LC_CTYPE="de_DE"
LC_NUMERIC="de_DE"
LC_TIME="de_DE"
LC_COLLATE="de_DE"
LC_MONETARY="de_DE"
LC_MESSAGES="de_DE"
LC_ALL=
[EMAIL PROTECTED]:~$ cat try.c
#include <ctype.h>
#include <stdio.h>

int main()
{
  int c = '�';
  printf("%c: %d\n", c, isprint(c));

  return 0;
}
[EMAIL PROTECTED]:~$ gcc try.c -o try -Wall
[EMAIL PROTECTED]:~$ ./try 
�: 0
[EMAIL PROTECTED]:~$ 

-----------------------------------------------------------------------

� is a valid printing character, especially in the german language
(LANG=de_DE).

-- System Information
Debian Release: 2.2
Architecture: i386
Kernel: Linux moby 2.3.99-pre3 #1 Son Apr 2 11:15:37 CEST 2000 i686

Versions of packages libc6 depends on:
ii  ldso                          1.9.11-8   The Linux dynamic linker, library 


---------------------------------------
Received: (at 63717-done) by bugs.debian.org; 8 May 2000 17:52:34 +0000
Received: (qmail 19460 invoked from network); 8 May 2000 17:52:34 -0000
Received: from drow.res.cmu.edu ([EMAIL PROTECTED])
  by master.debian.org with SMTP; 8 May 2000 17:52:34 -0000
Received: from drow by drow.res.cmu.edu with local (Exim 3.12 #1 (Debian))
        id 12orhp-0007aa-00; Mon, 08 May 2000 13:52:33 -0400
Date: Mon, 8 May 2000 13:52:33 -0400
From: Daniel Jacobowitz <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [EMAIL PROTECTED]: Bug#63717: isalpha()/toupper() functions do not 
work for non-ASCII characters]
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.1.9i

Saving Joel the work...

----- Forwarded message from Antti-Juhani Kaijanaho <[EMAIL PROTECTED]> -----

Date: Mon, 8 May 2000 10:32:46 +0300
From: Antti-Juhani Kaijanaho <[EMAIL PROTECTED]>
Subject: Bug#63717: isalpha()/toupper() functions do not work for non-ASCII 
characters
To: srittau <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Reply-To: Antti-Juhani Kaijanaho <[EMAIL PROTECTED]>, [EMAIL PROTECTED]

On Sun, May 07, 2000 at 06:04:03PM +0200, srittau wrote:
> The is*() and toupper()/tolower() functions do not work on non-ASCII
> characters, even if LC_CTYPE etc. are set to the correct language used:

Yes they do.

> [EMAIL PROTECTED]:~$ locale
> LANG=de_DE
> LC_CTYPE="de_DE"
> LC_NUMERIC="de_DE"
> LC_TIME="de_DE"
> LC_COLLATE="de_DE"
> LC_MONETARY="de_DE"
> LC_MESSAGES="de_DE"
> LC_ALL=
> [EMAIL PROTECTED]:~$ cat try.c
> #include <ctype.h>
> #include <stdio.h>
> 
> int main()
> {
>   int c = '�';
>   printf("%c: %d\n", c, isprint(c));
> 
>   return 0;
> }
> [EMAIL PROTECTED]:~$ gcc try.c -o try -Wall
> [EMAIL PROTECTED]:~$ ./try 
> �: 0
> [EMAIL PROTECTED]:~$ 

This is expected behaviour.  In the absence of a "setlocale" call the
program's locale is C.  To use the locale settings from the environment,
call setlocale(LC_ALL, "").  Observe:

$ locale
LANG=fi_FI
LC_CTYPE="fi_FI"
LC_NUMERIC="fi_FI"
LC_TIME="fi_FI"
LC_COLLATE="fi_FI"
LC_MONETARY="fi_FI"
LC_MESSAGES="fi_FI"
LC_ALL=
$ cat try-orig.c
#include <ctype.h>
#include <stdio.h>

int main()
{
  int c = '�';
  printf("%c: %d\n", c, isprint(c));

  return 0;
}
$ gcc try-orig.c -o try-orig -Wall
$ ./try-orig 
�: 0
$ cat try.c
#include <ctype.h>
#include <locale.h>
#include <stdio.h>

int main()
{
  int c = '�';
  setlocale(LC_ALL, "");
  printf("%c: %d\n", c, isprint(c));

  return 0;
}
$ gcc try.c -o try -Wall
$ ./try
�: 16384
$ 

This behaviour is (AFAIK) described in the ISO C standards, and in the
setlocale(3) manual page.

To the maintainer: you may close this bug.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

                    I'm moving IRL on May 2, 2000.
               New contact information on the home page


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



----- End forwarded message -----


Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         [EMAIL PROTECTED]         |  |       [EMAIL PROTECTED]      |
\--------------------------------/  \--------------------------------/

Reply via email to