See that attached testC.c file. Compiled with "#> gcc -o testC testC.c -lncursesw" With the codes, the second ncurses window "pWin1" will exactly cover the righ half of the second Chinese word in the string. But after popping up "pWin1", the "wnoutrefresh(pWin)" and "doupdate()" could not recover the content of string correctly. I have checked the codes and made a patch to fix the issue. Here attached the patches for both ncurses-5.4-15/RHEL4.8 and ncurses-5.5.26/RHEL5.3. The point with the patching is that: In doupdate()/TransformLine(), we have to re-print the whole wide char even though only half of the char was covered, cause the codes in PutAttrChar() always ignore the extended half of the wide char (and not print it to the stdout) ; and some terminal (eg. gnome-terminal) could not redraw the Wide Char if not the whole bytes of it were received from the pipe each time.
Created attachment 358657 [details] Testing code
Created attachment 358658 [details] patch for ncurses-5.4-15/RHEL4.7
Created attachment 358659 [details] patch for ncurses-5.5-26/RHEL5.3
This seems to be fixed in upstream patches 20070630 and 20070707: 20070707 + improve fix for refresh of window on top of multi-column characters, taking into account some split characters on left/right window boundaries. 20070630 + partial fix for refresh of window on top of multi-column characters which are partly overwritten (report by Sadrul H Chowdhury).
I think that fixes are for different situation, the issue reported here occurred with both ncurses-5.4-15 and ncurses-5.5-26, I think which are latest version for RHEL4 and RHEL5. Would you please run a test with my attached codes ?
I run the test and the patches seem to fix it. But I tried it only on RHEL5 (bug #519376), backporting for ncurses-5.4 will be a bit harder.
Created attachment 358903 [details] fix for refresh of window on top of multi-column characters
When will the issue be fixed on RHEL 4.x ? Can you just use my fixing patch for RHEL 4.7? I have tested it. This should work for RHEL 4.x.
As RHEL-4.9 is last update for RHEL-4 and it is not suitable for new features and should address only security, performance and critical issues, I'm closing that bugzilla WONTFIX. Note - https://bugzilla.redhat.com/show_bug.cgi?id=519376 is opened bugzilla for RHEL-5.