This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kompare/diff? encoding question

Tags: None
(comma "," separated)
fac3k
Registered Member
Posts
10
Karma
0
OS

kompare/diff? encoding question

Wed Mar 24, 2010 9:27 am
Hello,

I very much like kompare and use it quite a lot.

I have however ran into a little bit of a problem recently.

I have to compare files that are of M$Win origin.

xxx@lapek ~ $ file /media/Data/praca/cti/app_conf/FE3/FE3_dzopa/20100324/bkp/FE3_dzopa.conf

/media/Data/praca/cti/app_conf/FE3/FE3_dzopa/20100324/bkp/FE3_dzopa.conf: Non-ISO extended-ASCII text, with CRLF line terminators

They are CP1250 encoded.

When I open them in kate, I see polish fonts correctly:

Image

When I kompare these files I see strange symbols instead of letters.

Image

When I apply some changes and save edited file, it is saved in UTF-8 and all the "foreign" fonts are broken. I can no longer see them properly in kate.

Image

File is recognized as

xxx@lapek ~ $ file /media/Data/praca/cti/app_conf/FE3/FE3_dzopa_test/20100324/bkp/FE3_dzopa_test.conf
/media/Data/praca/cti/app_conf/FE3/FE3_dzopa_test/20100324/bkp/FE3_dzopa_test.conf: UTF-8 Unicode text, with CRLF line terminators

I do not know much about encoding so I am wondering if I it is possible to get it working properly (I guess open file in CP1250, compare in CP1250 and save in CP1250)?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kompare/diff? encoding question

Thu Mar 25, 2010 3:31 am
I would suggest using Kate to convert them into UTF-8.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
fac3k
Registered Member
Posts
10
Karma
0
OS

Re: kompare/diff? encoding question

Thu Mar 25, 2010 7:13 am
Yeah I could try that, however there are lots of files to work on. I forgot to mention that files need to stay CP1250 :(. So I`d have to convert files to UTF-8, compare and convert back to CP1250. That would mean lots of work overhead. I tried automating that with iconv and it works fine, that is just not really optimal :)

I tought it would be best if kompare could open and save files in files` original encoding (like kate) but I don`t know if that is configurable anyhow.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kompare/diff? encoding question

Thu Mar 25, 2010 7:16 am
Kompare should be able to handle non UTF-8 text without issue, and the files themselves are likely not at fault. Given that Kate handles them fine, please file a bug report at bugs.kde.org.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]