Thursday, June 18, 2009

diff unicode file

I was trying to get a diff of unicode file

When I was doing diff, I was getting result if it differs or not.

Then, by looking in to diff man page I found the solution.
Unicode file can be treated as normal file and we can find difference.

Without option
santosh-test:~ # diff unicode.txt unicode.txt.Backup.1
Files unicode.txt and unicode.txt.Backup.1 differ

With option
santosh-test:~ # diff unicode.txt unicode.txt.Backup.1 -a
32c32
< ReplacedString REPLACE_STRING
---
> REPLACE_STRING REPLACE_STRING

No comments: