• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Non-homogenous encoding in Mercurial causes merge problems using kdiff3

 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic