From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.8a4) Gecko/20040927 Description of problem: Midnight commander help does not show Polish characters. It prints only spaces :/ I converted appropriate files to UTF-8, but that gave me only 2 spaces for each non US-ASCII character :) Version-Release number of selected component (if applicable): mc-4.6.1-0.8 How reproducible: Always Steps to Reproduce: 1. Run mc with LANG=pl_PL.UTF-8 2. Press F1 Additional info: I added to mc.spec this lines: # convert original files to UTF8 pushd doc iconv -f iso8859-2 -t utf-8 -o pl/mc.1.in.tmp pl/mc.1.in && mv pl/mc.1.in.tmp pl/mc.1.in iconv -f iso8859-2 -t utf-8 -o pl/xnc.hlp.tmp pl/xnc.hlp && mv pl/xnc.hlp.tmp pl/xnc.hlp popd It's weird that it does not work, because convering mc.hint.pl to UTF-8 resolved the problem with broken tips.
It is quite possible the UTF-8 patches are incomplete. Hints probably work due to the utf8-hint patch. After the release of 4.6.1 work on the UTF-8 patches hopefully continues.
See also attachment 105723 [details] attached to bug 137036 which also has fixes to the spec file.
*** Bug 137036 has been marked as a duplicate of this bug. ***
The above attachment fixes three issues of which the adding of the utf-8 patch is rather unimportant. You can ignore it for this issue. Vladimir Nadvornik will be coming up with a patch soon I hope.
Nice to hear that the work is in progress 8)
utf8 part of attached patch is _additional_ to utf8-hints patch. May be we can use mbstrlen instead of some code in patch.
Created attachment 105748 [details] UTF-8ization of help Vladimir Nadvornik writes this wrt attachment 105722 [details] (utf-8 help fix): Thank you for the patch. However I see some problems: - calling utf8_to_local() from load_file() is quite dangerous. The hints are converted twice unless there are adjustments to hints patch. - there is a memory leak at utf8_to_local call - the original data are not freed. - I'd rather use mbrlen instead of handling utf8 directly. See attached the patch with my changes.
Above attachment is not entirely correct. p is a const char* and can thus not be passed to SLsmg_write_nchars. "Unconsting" p is not an option as it points to a const char* function variable.
Created attachment 106071 [details] Fixed help patch This patch fixes the above mentioned warning. Use of SLsmg_write_char() should be slightly faster than the use of SLsmg_write_nchars().
I just checked that patch :I I'm not a programmer and I don't know how it works, but it works ;) Of course I had to convert encoding of appropriate files to UTF-8. Big thanks to you all for your effort put into developing mc :)
Leonard, the patch doesn't work. I see only double spaces instead of polish letters and without the patch I see only single space after: $ LANG=pl_PL.UTF8 mc + pressing F1 I applied the patch aganist the UTF-8 patched version, not pure vanilla CVS, but it has no conflicts with the UTF-8 patches.
> $ LANG=pl_PL.UTF8 mc This patch works :I There should be LANG=pl_PL.UTF-8 mc I also noticed by accident, that MC logo is broken with UTF-8 locale. Run for example LANG=en_US mc or LANG=en_US.UTF-8 mc and then press F1.
Dawid, thanks. I didn't notice I mistyped the LANG. The patch is now applied.
The mc-4.6.1-0.9 is just built.