Search code examples
beyondcompare4

beyondcomare4 Problem with class file comparison


I use the beyondcompare software to compare the class code, but when the software opens the class file, it prompts a conversion error!

More strange is that my local compiled class can be converted, compiled on the server, the downloaded class can not be converted

I tried to compare 2 identical classes, one is server, one is local, and jd-gui is converted to java file comparison without any difference.

I downloaded it on the official website (https://www.scootersoftware.com/download.php?zz=kb_moreformatsv4), which is your conversion tool, Java class to source

The problem is as shown below, the class on the right shows a conversion error.
(source: sinaimg.cn)

The following figure is to decompile the two classes into java code, without any inconsistency.
(source: sinaimg.cn)


Solution

  • It looks like the file format has a problem with Unicode/Chinese characters in the file name/path.

    To fix the problem in Beyond Compare 4:

    1. Open Tools > File Formats.
    2. Select the Java Class to Source file format.
    3. Go to the Conversion tab.
    4. Change the dropdown External program (Unicode filenames) to External program (ANSI filenames), then Save.