Change encoding possible?

Discussion of open issues, suggestions and bugs regarding file and folder merge tool – Code Compare
Post Reply
radlclaus
Posts: 2
Joined: Thu 10 Sep 2015 14:06

Change encoding possible?

Post by radlclaus » Thu 10 Sep 2015 14:10

I use CodeCompare to merge translation files formatted by XML. With two files of different versions I am getting weird display of one of these in CodeCompare, while both show perfectly well in Notepad++.

I can see in the footer that encoding was chosen differently, the mispresented is ANSI, the correctly displayed UTF-8.

I could not find any way to tell CodeCompare to take same UTF-8 encoding for both.

Any hints how to get that done?

Thanks a lot in advance!

Artem
Devart Team
Posts: 137
Joined: Mon 21 Jun 2010 14:02

Re: Change encoding possible?

Post by Artem » Thu 10 Sep 2015 14:42

Code Compare detects encoding automatically. To prevent misdetection, you can write Byte Order Mark to file (Notepad++ -> Encoding -> Convert to UTF-8 BOM).

Can you attach a file that is shown in Code Compare with the wrong encoding?

radlclaus
Posts: 2
Joined: Thu 10 Sep 2015 14:06

Re: Change encoding possible?

Post by radlclaus » Fri 11 Sep 2015 07:21

Thanks a lot, that did the fix. Strange thing is that NotePad++ did take it for UTF8 already, CodeCompare not. Even when the lead line clearly says <?xml version="1.0" encoding="UTF-8"?>

As advised I took Notepad++ to convert to "UTF8 with BOM" and, voila, it fixed the matter.

Thanks a lot, this saved me lots of time!!
:mrgreen:

Post Reply