convert saved diff-text-file to 8 bit
authorClaus Gittinger <cg@exept.de>
Wed, 21 Jan 2009 15:35:21 +0100
changeset 8517 cc7558e6bda0
parent 8516 e83b1f8fe73f
child 8518 5bc38cbdafb1
convert saved diff-text-file to 8 bit (sigh - could we depend on an utf-diff ?)
DiffTextView.st
--- a/DiffTextView.st	Tue Jan 20 22:47:38 2009 +0100
+++ b/DiffTextView.st	Wed Jan 21 15:35:21 2009 +0100
@@ -363,6 +363,12 @@
                 (lOut first = (Character value:16rFEFF)) ifTrue:[
                     lOut := (lOut copyFrom:2) asSingleByteStringIfPossible.
                 ].
+                lOut bitsPerCharacter > 8 ifTrue:[ 
+                    lOut := lOut collect:[:ch | ch bitsPerCharacter > 8 
+                                                    ifTrue:[ Character value:16rFF ]
+                                                    ifFalse:[ ch ]].
+                    lOut := lOut asSingleByteStringIfPossible.
+                ].
             ].
             stream nextPutAll:lOut.
         ].
@@ -671,5 +677,5 @@
 !DiffTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.51 2008-10-22 16:03:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.52 2009-01-21 14:35:21 cg Exp $'
 ! !