[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debian patch: diff files in different encodings
From: |
Daniel Jacobowitz |
Subject: |
Debian patch: diff files in different encodings |
Date: |
Sun, 6 Apr 2008 12:54:56 -0400 |
User-agent: |
Mutt/1.5.17 (2007-12-11) |
Tore Morkemo reported that two files which print the same, one in
ISO-8859-1 and one in UTF-8, would not be detected by the "diff"
utility procedure. Here's the obvious fix.
--
Daniel Jacobowitz
CodeSourcery
2008-04-06 Daniel Jacobowitz <address@hidden>
* lib/utils.exp (diff): Open both files as binary.
---
lib/utils.exp | 2 ++
1 file changed, 2 insertions(+)
Index: dejagnu-1.4.4.cvs20060709/lib/utils.exp
===================================================================
--- dejagnu-1.4.4.cvs20060709.orig/lib/utils.exp 2007-04-01
18:19:23.000000000 -0400
+++ dejagnu-1.4.4.cvs20060709/lib/utils.exp 2007-04-01 18:19:48.000000000
-0400
@@ -320,6 +320,7 @@ proc diff { file_1 file_2 } {
if {[file exists ${file_1}]} {
set file_a [open ${file_1} r]
+ fconfigure $file_a -encoding binary
} else {
warning "${file_1} doesn't exist"
return 0
@@ -327,6 +328,7 @@ proc diff { file_1 file_2 } {
if {[file exists ${file_2}]} {
set file_b [open ${file_2} r]
+ fconfigure $file_b -encoding binary
} else {
warning "${file_2} doesn't exist"
return 0
- Debian patch: diff files in different encodings,
Daniel Jacobowitz <=