Bug 529790 - ncurses improperly renders utf-8 strings
Summary: ncurses improperly renders utf-8 strings
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ncurses
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 528279
TreeView+ depends on / blocked
 
Reported: 2009-10-20 02:27 UTC by Gabriel Somlo
Modified: 2009-10-27 09:47 UTC (History)
2 users (show)

Fixed In Version: 2.8-21.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-20 09:54:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
beware, editing the file using vi will likely alter/destroy the UTF-8 string ! (582 bytes, text/x-csrc)
2009-10-20 02:27 UTC, Gabriel Somlo
no flags Details

Description Gabriel Somlo 2009-10-20 02:27:37 UTC
Created attachment 365301 [details]
beware, editing the file using vi will likely alter/destroy the UTF-8 string !

Description of problem:
ncurses improperly renders utf-8 strings

Version-Release number of selected component (if applicable):
5.7-3

How reproducible:
compile and execute the attached example, utf_nc_bug.c. Compare and contrast with the strings contained in the source, as viewed in a terminal using 'cat', with LANG set to ru_RU and ru_RU.UTF-8

Steps to Reproduce:
1. gcc -o utf_nc_bug utf_nc_bug.c -Wall -lncurses
2. LANG=ru_RU.UTF-8 ./utf_nc_bug
3. LANG=ru_RU ./utf_nc_bug
  
Actual results:
with LANG set to ru_RU.UTF-8, the second string is improperly rendered and differs from the way it looks when cat-ing the source file

Expected results:
under LANG=ru_RU.UTF-8, the second string should be rendered correctly, and look the same way as it looks when cat-ing the source file

Additional info:

Comment 1 Alexey Torkhov 2009-10-20 08:12:46 UTC
That is strange, but according to
http://namakajiri.net/complog/trouble-using-utf-8-with-ncurses/

it should be linked to -lncursesw, and also have call of

setlocale(LC_CTYPE, "");

I've checked it works with these changes.

Comment 2 Fedora Update System 2009-10-20 14:54:10 UTC
aumix-2.8-21.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/aumix-2.8-21.fc10

Comment 3 Fedora Update System 2009-10-20 14:54:20 UTC
aumix-2.8-21.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/aumix-2.8-21.fc11

Comment 4 Fedora Update System 2009-10-20 14:54:30 UTC
aumix-2.8-21.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/aumix-2.8-21.fc12

Comment 5 Fedora Update System 2009-10-27 07:02:21 UTC
aumix-2.8-21.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2009-10-27 07:11:02 UTC
aumix-2.8-21.fc11 has been pushed to the Fedora 11 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.