Summary: | Kompare shows bad charset in compare view | ||
---|---|---|---|
Product: | [Applications] kompare | Reporter: | mrudolf |
Component: | general | Assignee: | KDiff/Kompare bugs <bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | grundleborg, marazm |
Priority: | NOR | ||
Version: | 3.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Cyrillic text for diff
Avoid overwriting the selected charset (encoding) |
Description
mrudolf
2002-03-08 13:35:37 UTC
On Fri 8 Mar 2002 Michal Rudolf wrote: > Package: kompare > Version: 3.0rc1 (compiled from specs) > Source: tar.gz > Compiler: egcs version 1.1.2 20000217 (RedHat) > OS: Linux (i586) release 2.2.14 > > Bad charset is used in Kompare compared files view. Characters from current > charset (utf-8/iso-8859-2 for me - Polish language) are shown in > ascii/iso-8859-1. I see no way to configure it either. Can you tell m exactly when it happens ? I mean: * does it happen when you compare 2 files in kompare ? * does it happen when you read in a diff file you made yourself with diff? If it is the first then i think i have found the problem if you compile from source can you change the 2 lines in kompareprocess.cpp that have fromLatin1 in them to fromLocal8Bit ? If this works please tell me as soon as possible so i can fix this before the release. If both can you give me some files in your encoding and a diff file then so i can test for myself ? (Mail the files to me personally it does not have to go through the list). Thanks for the bug report Otto W sob 9 mar 2002 16:02 Otto Bruggeman napisa=B3: >Can you tell m exactly when it happens ? I mean: >* does it happen when you compare 2 files in kompare ? >* does it happen when you read in a diff file you made yourself with diff? I found it while comparing 2 files. >If it is the first then i think i have found the problem if you compile >from source can you change the 2 lines in kompareprocess.cpp that have >fromLatin1 in them to fromLocal8Bit ? If this works please tell me as >soon as possible so i can fix this before the release. I think you can safely change it as using fromLatin1 was not recommended. I cannot compile KDE now (I just got new CVS version but it requires newe= r=20 version of some other packages I don't have yet. But I think your fix should do the trick. --=20 Micha=B3 Rudolf On Sun 10 Mar 2002 Michal Rudolf wrote: > W sob 9 mar 2002 16:02 Otto Bruggeman napisa=B3: > > >Can you tell m exactly when it happens ? I mean: > >* does it happen when you compare 2 files in kompare ? > >* does it happen when you read in a diff file you made yourself with dif= f? > I found it while comparing 2 files. > > >If it is the first then i think i have found the problem if you compile > >from source can you change the 2 lines in kompareprocess.cpp that have > >fromLatin1 in them to fromLocal8Bit ? If this works please tell me as > >soon as possible so i can fix this before the release. > I think you can safely change it as using fromLatin1 was not recommended. > I cannot compile KDE now (I just got new CVS version but it requires ne= wer > version of some other packages I don't have yet. > > But I think your fix should do the trick. Ok i will put it in CVS and leave the bug open for now until you can confirm to me that it is fixed. Otto Created attachment 8628 [details]
Cyrillic text for diff
The bug shows again in KDE 3.3.1. No matter what is chosen for an encoding, Kompare shows the text in ascii/iso-8859-1. Running Slackware with KDE 3.3.1 downloaded from ftp://ftp.gwdg.de/pub/x11/kde. Same behavior seen on Mdk10.1 Same bug in KDE 3.3.2 on Gentoo. I needed to compare 2 files with UTF-8. I set encoding to UTF-8, but kompare showed to me those files w/o UTF-8 (latin1 or smtn else). And - whorse - after saving changes I got corrupted files - some UTF-8 chars where damaged and there was no way to automaticly correct this problem - search/replace give wrong results. Same bug on turkish versions on both fc3, kde3.4 and pardus kde3.5. my files are iso-8859-9 but when kompare compares it show as if were iso-8859-1, writes to disk as utf-8 chars. But these chars are false (in turkish (8859-9)we have I dot on it, but on (8859-1) it is Y dot on it). i changed my console encoding tr to tr.utf succesfully but i cant make kompare work. i think this problem is not effect dialog's encoding in compare (see debug message . change from dialog->encoding to "default") so Kompare shows bad charset in compare view i did solve this problem correct flowing part... comment out : m_viewPart->setEncoding( "Default" ); in kompare_shell.cpp void KompareShell::compare(const KURL& source,const KURL& destination ) { m_sourceURL = source; m_destinationURL = destination; //m_viewPart->setEncoding( "Default" ); m_viewPart->compare( source, destination ); } void KompareShell::blend( const KURL& url1, const KURL& diff ) { m_sourceURL = url1; m_destinationURL = diff; //m_viewPart->setEncoding( "Default" ); m_viewPart->openDirAndDiff( url1, diff ); } *** This bug has been confirmed by popular vote. *** I'm using KDE 3.5.3 and the problem is still there. My system character encoding is UTF-8 (en_US.UTF-8 locale) but kompare shows all diffs as if they were 8-bit Latin1. Kdiff3 can be used instead Created attachment 20752 [details] Avoid overwriting the selected charset (encoding) I think this patch can resolve following listed bugs 39108, 95054, 112729, 123683, 131280. This patch avoids kompare to overwrite the charset (encoding) selected in the file open dialog with the default charset defined by operating system. Hopefully, Jan This is fixed in trunk for KDE4 and the KDE 3.5 branch. |