Hello,
Le Sun, 20 Dec 2009 17:08:33 +0100, Johannes Bauer a écrit :
>
> #!/usr/bin/python3
> import gzip
> x = gzip.open("testdatei", "wb")
> x.write("ä")
The bug here is that you are trying to write an unicode text string ("ä")
to a binary file (a gzip file). This bug has been fixed now; in th
"Diez B. Roggisch" wrote in message
news:7p7328f3r1r2...@mid.uni-berlin.de...
Johannes Bauer schrieb:
> Hello group,
>
> with this following program:
>
> #!/usr/bin/python3
> import gzip
> x = gzip.open("testdatei", "wb")
> x.write("ä")
> x.close()
>
> I get a broken .gzip file when decompressin
Johannes Bauer schrieb:
Hello group,
with this following program:
#!/usr/bin/python3
import gzip
x = gzip.open("testdatei", "wb")
x.write("ä")
x.close()
I get a broken .gzip file when decompressing:
$ cat testdatei |gunzip
ä
gzip: stdin: invalid compressed data--length error
As it only happe
Hello group,
with this following program:
#!/usr/bin/python3
import gzip
x = gzip.open("testdatei", "wb")
x.write("ä")
x.close()
I get a broken .gzip file when decompressing:
$ cat testdatei |gunzip
ä
gzip: stdin: invalid compressed data--length error
As it only happens with UTF-8 characters,