wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Non-homogenous encoding in Mercurial causes merge problems using kdiff3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Non-homogenous encoding in Mercurial causes merge problems using kdiff3" Watch "Non-homogenous encoding in Mercurial causes merge problems using kdiff3" New topic
Author

Non-homogenous encoding in Mercurial causes merge problems using kdiff3

Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

I've got a Mercurial repository that contains a few Java projects, a C project and a bunch of SQL/configuration files. Unfortunately, these files are stored in different encoding - UTF-8 for Java projects and windows-1250 for everything else. I'm using TortoiseHg and kdiff3 to merge branches. I've found that during some merges the national characters in windows-1250 files got garbled.

The last merge which garbled some files happened some time ago, and I may be using different Regional Settings in kdiff3 now. Currently I've set the encoding to windows-1250 and checked the box to automatically recognize Unicode. However, if I use kdiff3 to diff a UTF-8 file which does contain national characters, the UTF-8 encoding is not recognized and national characters in the file are garbled. (This does not mean that a merge process would result to a garbled file, of course, it just means that kdiff3 didn't detect the file is in UTF-8.)

Is it possible to safely use kdiff3 in this situation? If not, is there another diff/merge tool which would handle multiple encodings more gracefully (I could specify encodings by top-level repository folder)?

Of course, I could unify the encodings (probably converting Java projects to windows-1250), though I'd rather explore other options first.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Non-homogenous encoding in Mercurial causes merge problems using kdiff3
 
Similar Threads
Eclipse, CVS, and accent characters
Extended characters encoding in java
how to get rid of leading space when i use writeUTF
reading foreign characters (say, multi-byte charcters, Japanese, Turkish, etc) from a file in java.
Tomcat madness!