diff --git a/extra/http/client/client.factor b/extra/http/client/client.factor index f011ff537e..0d733ba97d 100755 --- a/extra/http/client/client.factor +++ b/extra/http/client/client.factor @@ -82,8 +82,8 @@ PRIVATE> : download-to ( url file -- ) #! Downloads the contents of a URL to a file. - swap http-get-stream check-response - [ swap binary stream-copy ] with-disposal ; + swap http-get-stream swap check-response + [ swap latin1 stream-copy ] with-disposal ; : download ( url -- ) dup download-name download-to ; diff --git a/extra/io/encodings/ascii/ascii.factor b/extra/io/encodings/ascii/ascii.factor index fdefc35634..1c50e4c2a4 100644 --- a/extra/io/encodings/ascii/ascii.factor +++ b/extra/io/encodings/ascii/ascii.factor @@ -9,7 +9,7 @@ IN: io.encodings.ascii TUPLE: ascii ; M: ascii stream-write-encoded ( string stream encoding -- ) - drop 127 encode-check<= ; + drop 128 encode-check<= ; M: ascii decode-step drop dup 128 >= [ decode-error ] [ swap push ] if ; diff --git a/extra/io/encodings/latin1/latin1.factor b/extra/io/encodings/latin1/latin1.factor index 989f45bc64..3cb361b2fd 100755 --- a/extra/io/encodings/latin1/latin1.factor +++ b/extra/io/encodings/latin1/latin1.factor @@ -6,7 +6,7 @@ IN: io.encodings.latin1 TUPLE: latin1 ; M: latin1 stream-write-encoded - drop 255 encode-check<= ; + drop 256 encode-check<= ; M: latin1 decode-step - drop dup 256 >= [ decode-error ] [ swap push ] if ; + drop swap push ;