[Bug 584896] New: glibc printf with '%ls' conversion specification fails
http://bugzilla.novell.com/show_bug.cgi?id=584896 http://bugzilla.novell.com/show_bug.cgi?id=584896#c0 Summary: glibc printf with '%ls' conversion specification fails Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: x86-64 OS/Version: openSUSE 11.2 Status: NEW Severity: Major Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: ldav1s@yahoo.com QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=346146) --> (http://bugzilla.novell.com/attachment.cgi?id=346146) The source code exhibiting the problem. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/5325 (KHTML, like Gecko) Chrome/4.0.249.30 Safari/532.5 printf returns an error and doesn't print out text from a wchar_t buffer when using the "%ls" conversion specifier. Basically it is this: printf("%ls\n", txt); See the attached program for more info. Reproducible: Always Steps to Reproduce: 1.compile the program: gcc -g -o mir -std=gnu9x -Wall mir.c 2.run the program: ./mir Actual Results: observe no output Expected Results: print out "Мнр" -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=584896 http://bugzilla.novell.com/show_bug.cgi?id=584896#c yang xiaoyu <xyyang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xyyang@novell.com AssignedTo|bnc-team-screening@forge.pr |pbaudis@novell.com |ovo.novell.com | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=584896 http://bugzilla.novell.com/show_bug.cgi?id=584896#c1 Petr Baudis <pbaudis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Petr Baudis <pbaudis@novell.com> 2010-05-15 01:00:48 UTC --- Thanks for your report. However, the problem is in your setlocale() statement - there is no "UTF-8" locale; the locale is specified roughly as region[_LANGUAGE][.CHARSET]. Thus, if I use e.g. cs_CZ.UTF-8 instead of just UTF-8, your testcase works fine for me. Otherwise, the default C locale is used and glibc does not know how to properly output wchars in such situation, thus panicking. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com