Does bazaar's built in diff support UTF-16 files?

Asked by BrianPeiris on 2009-09-20

Bazaar's built-in diff seems to fail for UTF-16 files such as the ones created by Microsoft's SQL script generator.
Running bzr diff on a modified UTF-16 file results in a message similar to "Binary files ... differ". Also bzr diff fails whether or not the file includes a Byte Order Mark (BOM).

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Last query:
Last reply:
BrianPeiris (brianpeiris) said : #1

I've confirmed this already, using a simple test with ASCII, UTF-8 and UTF-16. Bazaar's diff does not work for UTF-16 files (Unless I'm completely wrong). I just wanted to put the question and answer here because the documentation I could find on leads you to believe that Unicode is supported across bazaar and it took me a while to find the actual answer.

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

BrianPeiris (brianpeiris) said : #3

Someone can mark this as answered/solved, unless I was wrong about my confirmation.

Martin Pool (mbp) said : #4


Unfortunately this is a bug in bzr at the moment, that it doesn't correctly detect and decode UTF-16 files for diff/annotate etc. You should be able to use an external diff program however, through diff --using.


Can you help with this problem?

Provide an answer of your own, or ask BrianPeiris for more information if necessary.

To post a message you must log in.