From a24623827ffb3c715926130fc983e0b5cb7452e1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 10 Feb 2015 12:34:34 -0400 Subject: bittorrent: Fix mojibake introduced in parsing arai2c progress output. hGetSomeString reads one byte at a time, so unicode bytes are not composed. The problem comes when outputting that to the console with hPut; that tried to apply the handle's encoding, and so we get mojibake. Instead, use ByteStrings, and only convert it to a string for parsing, not for display. Note that there are a couple of other things that use hGetSomeString, which I've left as-is for now. --- doc/bugs/bittorrent_special_url_double-encoding.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/bugs/bittorrent_special_url_double-encoding.mdwn') diff --git a/doc/bugs/bittorrent_special_url_double-encoding.mdwn b/doc/bugs/bittorrent_special_url_double-encoding.mdwn index 1665e1ed7..ebbf76a34 100644 --- a/doc/bugs/bittorrent_special_url_double-encoding.mdwn +++ b/doc/bugs/bittorrent_special_url_double-encoding.mdwn @@ -173,3 +173,5 @@ LC_ALL= """]] Previous similar UTF-8 bug: [[forget_corrupts_non-ascii_chars]]. Looks similar. --[[anarcat]] + +> [[fixed|done]] --[[Joey]] -- cgit v1.2.3