This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[skimo@kotnet.org] libc/2302: putwc doesn't work in glibc 2.2.3



Hi,

can anybody comment on this bug report, please?

Thanks,
Andreas



Topics:
   libc/2302: putwc doesn't work in glibc 2.2.3





>Number:         2302
>Category:       libc
>Synopsis:       putwc doesn't work in glibc 2.2.3/en_GB.UTF-8
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    libc-gnats
>State:          open
>Quarter:        
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Wed May 30 12:35:02 -0400 2001
>Cases:          
>Originator:     Sven Verdoolaege
>Release:        libc-2.2.3
>Organization:
 
>Environment:
	
Host type: i586-pc-linux-gnu
System: Linux pool 2.2.14 #8 Sun Jan 16 00:56:33 MET 2000 i586 unknown
Architecture: i586

Addons: linuxthreads

Build CC: gcc
Compiler version: 2.95.2 19991024 (release)
Kernel headers: 2.2.14
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
	
	putwc doesn't seem to work. At least not the way I'd expect
	it to work (the way I expect it to work is how it works on
	Solaris).

	The following program shows that putwc does not prints
	out the character literally rather than first converting
	it to a multibyte representation (CODESET).

#include <wchar.h>
#include <stdlib.h>
#include <locale.h>
#include <unistd.h>
#include <stdio.h>

int main(void)
{
    wchar_t wc[20], *wp;

    setlocale(LC_ALL, "");
    puts("");
    mbstowcs(wc, "Español", 20);
    for (wp = wc; *wp; ++wp) {
	putwc(*wp, stdout);
    }
    puts("");
    fflush(stdout);
}

	This is the typescript:

Script started on Wed May 30 18:07:55 2001

skimo@pool:/tmp > ../testwc


Español

skimo@pool:/tmp > eexit


Script done on Wed May 30 18:08:00 2001

	These are my locale settings at the time of running the program:

skimo@pool:/tmp > locale
LANG=POSIX
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8

>How-To-Repeat:
	
	Compile and run the above program in the given locale.
>Fix:
	






-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]