When running CPD from ant, the encoding of the generated .xml file is Cp1252. Setting the encoding in the ant task to UTF-8 has no effect. Due to this encoding, the XSTL is unable to generate a formated report.
We've just documented this limitation. Indeed, CPD can't transcode (is this the appropriate word for it ?) your source code for you. Therefore, if you have a source file in CP1252 and you have some duplicated code with CP1252 character specific , those will end up in your cpd.xml...
Sadly, I don't think we can fix it. The best approach is probably to set your IDE to encode file in UTF8 and fix the CP1252 specific character manually (at least in duplicated code part).
Sorry.
(ps: of course, i'm maybe wrong, if someone see this thread and have an idea on how to adress this issue, please reopen it !)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
We've just documented this limitation. Indeed, CPD can't transcode (is this the appropriate word for it ?) your source code for you. Therefore, if you have a source file in CP1252 and you have some duplicated code with CP1252 character specific , those will end up in your cpd.xml...
Sadly, I don't think we can fix it. The best approach is probably to set your IDE to encode file in UTF8 and fix the CP1252 specific character manually (at least in duplicated code part).
Sorry.
(ps: of course, i'm maybe wrong, if someone see this thread and have an idea on how to adress this issue, please reopen it !)