1

How to change default comparison mode from binary to text in Eclipse IDE? Currently it's set to binary and I could not find an option to change that from Preferences > General > Compare/Patch.

I am trying to compare flat text files.

enter image description here

Saikat
  • 14,222
  • 20
  • 104
  • 125
  • If _Default_ is selected, the file content is used to decide whether to compare it as binary or as text. Make sure the correct encoding is set. Which kind of files do you compare? – howlger May 26 '18 at 08:08
  • I am comparing CSV files, created using the [Apache Commons](https://commons.apache.org/proper/commons-csv/archives/1.2/apidocs/org/apache/commons/csv/CSVFormat.html#EXCEL) library – Saikat May 26 '18 at 09:40
  • 2
    Make sure the correct text encoding is set: right-click and choose _Properties_ (or Alt+Enter), in _Resource_ you can change the _Text file encoding_ (this can also be changed on folder, on project and on workspace level). If this does not help, try to add `*.csv` as content type of _Text_: https://stackoverflow.com/a/50525785/6505250 – howlger May 26 '18 at 10:11
  • We have *.epf files (eclipse preference files from workspace mechanics) and the hint from @howlger made the difference. I added a new content type via preferences and then text compare was used as default. – proko Jan 07 '20 at 09:36
  • 1
    I am having a similar problem with **PHP Development Tools 6.2** in Eclipse build **20190314-1200**. Comparing *.php* files defaults to "*PHP Content Type Compare*". But it doesn't work well & I want it to default to "*PHP Compare*" or "*Text Compare*". – AntumDeluge Feb 19 '20 at 17:08

0 Answers0