applied fixes for the UTF8ToISO8859x transcoding routine suggested by Mark

* encoding.c: applied fixes for the UTF8ToISO8859x transcoding
  routine suggested by Mark Itzcovitz
diff --git a/ChangeLog b/ChangeLog
index 8e0a2ed..ad3263c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep  9 07:22:11 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+	* encoding.c: applied fixes for the UTF8ToISO8859x transcoding
+	  routine suggested by Mark Itzcovitz
+	  
 Wed Sep  8 22:50:27 CEST 2004 Daniel Veillard <daniel@veillard.com>
 
 	* valid.c xmlsave.c: fixed 2 problems raised by #152140, one
diff --git a/encoding.c b/encoding.c
index fc768ab..e3ca7d8 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2230,7 +2230,7 @@
                 return(-2);
             }
             c = *in++;
-            if ((c & 0xC0) != 0xC0) {
+            if ((c & 0xC0) != 0x80) {
                 /* not a trailing byte */
                 *outlen = out - outstart;
                 *inlen = in - instart - 2;
@@ -2256,14 +2256,14 @@
                 return(-2);
             }
             c1 = *in++;
-            if ((c1 & 0xC0) != 0xC0) {
+            if ((c1 & 0xC0) != 0x80) {
                 /* not a trailing byte (c1) */
                 *outlen = out - outstart;
                 *inlen = in - instart - 2;
                 return(-2);
             }
             c2 = *in++;
-            if ((c2 & 0xC0) != 0xC0) {
+            if ((c2 & 0xC0) != 0x80) {
                 /* not a trailing byte (c2) */
                 *outlen = out - outstart;
                 *inlen = in - instart - 2;
@@ -2271,8 +2271,9 @@
             }
             c1 = c1 & 0x3F; 
             c2 = c2 & 0x3F; 
-            d = d & 0x0F;
-            d = xlattable [48 + c2 + xlattable [48 + c1 + xlattable [32 + d] * 64] * 64];
+	    d = d & 0x0F;
+	    d = xlattable [48 + c2 + xlattable [48 + c1 + 
+	    		xlattable [32 + d] * 64] * 64];
             if (d == 0) {
                 /* not in character set */
                 *outlen = out - outstart;