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

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2009-10-06
Last reply:
2009-10-08
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 http://bazaar-vcs.org 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

Hi,

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.

See http://www.nabble.com/Unicode-(UTF-16)-files-on-Windows-td25058157.html

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.