--- http_response.py-old 2005-08-21 16:53:11.000000000 +0200 +++ http_response.py 2005-08-21 16:50:40.000000000 +0200 @@ -220,10 +220,10 @@ def _encode_chunk(self, chunk): """(chunk : str | unicode) -> str """ - if self.charset == 'iso-8859-1' and isinstance(chunk, str): - return chunk # non-ASCII chars are okay - else: + if isinstance(chunk, unicode): return chunk.encode(self.charset) + else: + return chunk # non-ASCII chars are okay def _compress_body(self, body): """(body: str) -> str