[XML-SIG] UTF-8 and ISO-8859-1 problems again

matt matt@virtualspectator.com
Wed, 10 Jan 2001 18:20:43 +1300


--Boundary-=_yGgxxpkLoRellNMPapqfWkHOPkMC
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

If this is a bug, I will post it, but I'm not sure it is yet.  Attached are two
files, one a test xml with encoding ISO-8859-1 and the other a test python
script.  The problem is that if one uses a pyexpat parser, and then renders in
ISO-8859-1 then things are ok.  If one uses the drv_xmllib driver, then an
error occurs as it tries to translate back to ISO-8859-1.  My guess is that the
ISO-8859-1 transformation into UTF-8 for character data(which is what happens
when the original document is parsed) is not being done properly in the
drv_xmllib driver.

I have also included an xml document created within the script to show that
infact that one is ok, and that it is the parser that is doing something wrong,
or me doing something wrong with the parser.

My only reason for using drv_xmllib is that pyexpat still has a memory leak in
it.

I was using PyXML-1.2, but just tried PyXML-1.3 and the errors still occur.

regards
Matt

--Boundary-=_yGgxxpkLoRellNMPapqfWkHOPkMC
Content-Type: text/x-java;
  name="test.py"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.py"

ZnJvbSB4bWwuZG9tIGltcG9ydCBpbXBsZW1lbnRhdGlvbgpmcm9tIHhtbC5kb20gaW1wb3J0IGV4
dApmcm9tIHhtbC5kb20uZXh0LnJlYWRlciBpbXBvcnQgU2F4MgoKZHQgPSBpbXBsZW1lbnRhdGlv
bi5jcmVhdGVEb2N1bWVudFR5cGUoJycsJycsJycpCmRvYyA9IGltcGxlbWVudGF0aW9uLmNyZWF0
ZURvY3VtZW50KCcnLCd0ZXN0JyxkdCkKY2RzID0gZG9jLmNyZWF0ZUNEQVRBU2VjdGlvbigiaGVs
bG8iKQpjZHMuZGF0YT0iaGVsbG8gdGhpcyBpcyB0ZXh0IDog6SIKZm4gPSBkb2MuZ2V0RWxlbWVu
dHNCeVRhZ05hbWVOUygnJywnKicpWzBdCmZuLmFwcGVuZENoaWxkKGNkcykKCmV4dC5QcmV0dHlQ
cmludChkb2MsZW5jb2Rpbmc9J0lTTy04ODU5LTEnKQoKZnJvbSB4bWwuc2F4IGltcG9ydCBzYXhl
eHRzCgpkb2MyID0geG1sX2RvbV9vYmplY3QgPSBTYXgyLkZyb21YbWxGaWxlKCd0ZXN0LnhtbCcp
CmRvYzMgPSB4bWxfZG9tX29iamVjdCA9IFNheDIuRnJvbVhtbEZpbGUoJ3Rlc3QueG1sJyxwYXJz
ZXI9c2F4ZXh0cy5YTUxQYXJzZXJGYWN0b3J5Lm1ha2VfcGFyc2VyKCd4bWwuc2F4LmRyaXZlcnMu
ZHJ2X3B5ZXhwYXQnKSkKZG9jNCA9IHhtbF9kb21fb2JqZWN0ID0gU2F4Mi5Gcm9tWG1sRmlsZSgn
dGVzdC54bWwnLHBhcnNlcj1zYXhleHRzLlhNTFBhcnNlckZhY3RvcnkubWFrZV9wYXJzZXIoJ3ht
bC5zYXguZHJpdmVycy5kcnZfeG1sbGliJykpCgpwcmludApwcmludCAibm8gcGFyc2VyIHdhcyBz
ZWxlY3RlZCAuLiBzaG91bGQgZGVmYXVsdCB0byBweWV4cGF0IgpleHQuUHJldHR5UHJpbnQoZG9j
MixlbmNvZGluZz0nSVNPLTg4NTktMScpCgpwcmludApwcmludCAicHlleHBhdCB3YXMgcGFyc2Vy
IHNlbGVjdGVkIgpleHQuUHJldHR5UHJpbnQoZG9jMyxlbmNvZGluZz0nSVNPLTg4NTktMScpCgpw
cmludApwcmludCAiZHJ2X3htbGxpYiB3YXMgcGFyc2VyIHNlbGVjdGVkIgpleHQuUHJldHR5UHJp
bnQoZG9jNCxlbmNvZGluZz0nSVNPLTg4NTktMScpCiMgbm90ZSBpdCBpcyBmaW5lIGlmIHByaW50
ZWQgYXMgVVRGLTggZm9ybWF0Cgo=

--Boundary-=_yGgxxpkLoRellNMPapqfWkHOPkMC
Content-Type: text/x-c++;
  name="test.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.xml"

PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nSVNPLTg4NTktMSc/Pgo8dGVzdD48IVtDREFU
QVtoZWxsbyB0aGlzIGlzIHRleHQgOiDpXV0+CjwvdGVzdD4K

--Boundary-=_yGgxxpkLoRellNMPapqfWkHOPkMC--