Bug 661506 - wins_nwstr works incorrectly in cs_CZ.UTF-8, breaking aspell and probably others
Summary: wins_nwstr works incorrectly in cs_CZ.UTF-8, breaking aspell and probably others
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ncurses
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-08 21:08 UTC by Jaroslav Škarvada
Modified: 2010-12-23 19:54 UTC (History)
4 users (show)

Fixed In Version: ncurses-5.7-9.20100703.fc14
Clone Of:
Environment:
Last Closed: 2010-12-23 19:54:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
reproducer (301 bytes, text/x-csrc)
2010-12-08 21:10 UTC, Jaroslav Škarvada
no flags Details
Possible patch (459 bytes, patch)
2010-12-08 21:17 UTC, Jaroslav Škarvada
no flags Details | Diff

Description Jaroslav Škarvada 2010-12-08 21:08:17 UTC
Description of problem:
wins_nwstr works incorrectly in cs_CZ.UTF-8

Version-Release number of selected component (if applicable):
ncurses-5.7-8.20100703.fc14
Also reproducible in rawhide.

How reproducible:
Always

Steps to Reproduce:
1. gcc -o reproducer reproducer.c -lncursesw
2. LANG=cs_CZ.UTF-8 ./reproducer
3. Type "í" (e.g. press 9 on czech keyboard)
  
Actual results:
Nothing happened.

Expected results:
"í" should be echoed.

Additional info:
This bug is breaking aspell for czech language (e.g. it is impossible to write replacement word with í, á and others). It was originally discovered by Ivan Loh (loh at 1917 dot com).

Comment 1 Jaroslav Škarvada 2010-12-08 21:10:04 UTC
Created attachment 467580 [details]
reproducer

Comment 2 Jaroslav Škarvada 2010-12-08 21:17:29 UTC
Created attachment 467585 [details]
Possible patch

The problem: some chars in cs_CZ.UTF-8 locale (and probably other locales as well) are single bytes, but not ASCII, thus they are not correctly processed. The attached patch should fix it. But it is possible that there are more such "broken" calls in ncurses.

Comment 3 Miroslav Lichvar 2010-12-09 09:11:37 UTC
I can reproduce this with 20101128 patch too.

Comment 4 Miroslav Lichvar 2010-12-13 17:06:34 UTC
It's fixed in upstream patch 20101211. Thanks.

The two changes in lib_ins_wch are included in ncurses-5.7-9.20100703.fc14.

Comment 5 Fedora Update System 2010-12-13 17:13:45 UTC
ncurses-5.7-9.20100703.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ncurses-5.7-9.20100703.fc14

Comment 6 Thomas E. Dickey 2010-12-13 21:36:01 UTC
no problem (I reviewed my test-programs for that area, and
still have some to-do's for the test-programs, but didn't
find any more library fixes to make).

Comment 7 Fedora Update System 2010-12-15 08:57:04 UTC
ncurses-5.7-9.20100703.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ncurses'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ncurses-5.7-9.20100703.fc14

Comment 8 Fedora Update System 2010-12-23 19:54:41 UTC
ncurses-5.7-9.20100703.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.