diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-02-10 12:34:34 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-02-10 12:34:34 -0400 |
commit | a24623827ffb3c715926130fc983e0b5cb7452e1 (patch) | |
tree | 29eaf7cc1a80d5941daad0c54a19c8058ab2606a /doc | |
parent | f790ba917617065b9059817b3f1fbc6853ea5b76 (diff) |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bugs/aria2c_display_broken_in_git-annex/comment_1_770e1d657bba2a3f5782eac2e8bdca57._comment | 14 | ||||
-rw-r--r-- | doc/bugs/bittorrent_special_url_double-encoding.mdwn | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/bugs/aria2c_display_broken_in_git-annex/comment_1_770e1d657bba2a3f5782eac2e8bdca57._comment b/doc/bugs/aria2c_display_broken_in_git-annex/comment_1_770e1d657bba2a3f5782eac2e8bdca57._comment new file mode 100644 index 000000000..2fe9bf475 --- /dev/null +++ b/doc/bugs/aria2c_display_broken_in_git-annex/comment_1_770e1d657bba2a3f5782eac2e8bdca57._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2015-02-10T16:11:09Z" + content=""" +This is because aria2c detects it's not outputting to a terminal, so it +stops using \r for progress displays. You can get the same effect by piping +aria2c to less. There does not seem to be any switch to force console-style +output. + +The only solution would be the complexity of making git-annex use a pty +internally, or just not showing aria2c progress output (or not intercepting +it for metering). +"""]] 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]] |