Version: 3.3 (using KDE 3.3.2, Gentoo) Compiler: gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7) OS: Linux (i686) release 2.6.9-gentoo-r9 The choice of the encoding does not influence work of the appendix. At record Russian letters vary on signs on a question.
I'm not sure exactly what this means, but I am aware that Kompare does not always honour the system's locale settings properly at the moment. Alex: Could you please be more specific about the problem here? - I need to know what encoding you think kompare *should* be using, what you have done to try and make it use the encoding you want, and what encoding it appears to be using. I'm afraid that information about how Russian writing is done isn't all that helpful, and I have no idea what you meant about an appendix. Other information that can help: - the output of the 'locale' command in a terminal - screenshots of the text in kompare and the text rendered properly (i.e in another application) - the files you are comparing All of the above can either be entered as comments or attached as files to this bug report. - Jeff
Locale: LANG=ru_RU.KOI8-R LC_CTYPE="ru_RU.KOI8-R" LC_NUMERIC="ru_RU.KOI8-R" LC_TIME="ru_RU.KOI8-R" LC_COLLATE="ru_RU.KOI8-R" LC_MONETARY="ru_RU.KOI8-R" LC_MESSAGES="ru_RU.KOI8-R" LC_PAPER="ru_RU.KOI8-R" LC_NAME="ru_RU.KOI8-R" LC_ADDRESS="ru_RU.KOI8-R" LC_TELEPHONE="ru_RU.KOI8-R" LC_MEASUREMENT="ru_RU.KOI8-R" LC_IDENTIFICATION="ru_RU.KOI8-R" LC_ALL= Encoding of file: cp1251
I'm having the same problem. I have a testcase of two simple files with cyrillic text in UTF-8. When selecting the files, I select encoding "utf8" in the combobox. Kompare opens the files, but the text shows in iso8859-1. I've downloaded kompare from CVS (both HEAD and KDE_3_3_BRANCH), compiled it, behavior is the same. Debug messages confirm that the first file opens in UTF-8 (or whatever was chosen), but the diff is opened in iso8859-1. I changed two calls to KGlobal::charsets()->codecForName(encoding.latin1()) in komparemodellist.cpp and kompareprocess.cpp with QTextCodec::codecForName(encoding.latin1()) and now UTF-8 shows but kompare crashes with any other encoding. Using Slackware 10.0 with KDE 3.3.1 downloaded from KDEs servers...
Created attachment 8942 [details] Two files in UTF-8
Hi Bozidar, Thanks for taking a look at this - I just took a look at the docs, and KGlobal::charsets()->codecforname will return a Latin-1 codec if the requested one is not found, wheras QTextCodec returns NULL. This is probably the cause of the crash.. however, I can't think why KGlobal::charsets() would give different results to QTextCodec for a codec like utf8.. I'll take a closer look at this sometime soon(ish) Cheers, Jeff
*** Bug 104459 has been marked as a duplicate of this bug. ***
Created attachment 20607 [details] Patch against encoding issues This patch resolves the problem of wrong displayed characters e.g. two utf8 files compared against each other and the output of kompare is not utf8. Simon Kim wrote (in Bug: 39108) on 2006-04-19 the idea of this patch, but the code wasn't implemented into kompare source right now. May be this patch resolves some other bugs: 112729, 39108
This is fixed in trunk for KDE4 and the KDE 3.5 branch.