{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/10274","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/10274/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10274/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/10274/events","html_url":"https://github.com/JuliaLang/julia/issues/10274","id":58477537,"number":10274,"title":"\"invalid UTF-8 character index\" when showing binary data","user":{"login":"jiahao","id":1732,"avatar_url":"https://avatars.githubusercontent.com/u/1732?v=3","gravatar_id":"","url":"https://api.github.com/users/jiahao","html_url":"https://github.com/jiahao","followers_url":"https://api.github.com/users/jiahao/followers","following_url":"https://api.github.com/users/jiahao/following{/other_user}","gists_url":"https://api.github.com/users/jiahao/gists{/gist_id}","starred_url":"https://api.github.com/users/jiahao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiahao/subscriptions","organizations_url":"https://api.github.com/users/jiahao/orgs","repos_url":"https://api.github.com/users/jiahao/repos","events_url":"https://api.github.com/users/jiahao/events{/privacy}","received_events_url":"https://api.github.com/users/jiahao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-21T22:17:58Z","updated_at":"2015-02-23T02:17:17Z","closed_at":"2015-02-23T02:17:17Z","body":"Of course one shouldn't try to ever do this in real code, but consider what happens when this JPG is downloaded.\r\n\r\n```jl\r\njulia> using Requests; get(\"https://avatars.githubusercontent.com/u/744556?v=3\")\r\nResponse(200 OK, 28 Headers, 29365 Bytes in Body)\r\n\r\njulia> ans.data\r\n\"\\U1a01df90JFIF\\0\\x01\\x01\\0\\0\\x01\\0\\x01\\0\\0\\U3bfba092EATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 90\\n\\U18fc0f83\\x02\\x02\\x03\\x02\\x02\\x03\\x03\\x03\\x03\\x04\\x03\\x03\\x04\\x05\\b\\x05\\x05\\x04\\x04\\x05\\n\\a\\a\\x06\\b\\f\\n\\f\\f\\v\\n\\v\\v\\r\\x0e\\x12\\x10\\r\\x0e\\x11\\x0e\\v\\v\\x10\\x16\\x10\\x11\\x13\\x14\\x15\\x15\\x15\\f\\x0f\\x17\\x18\\x16\\x14\\x18\\x12\\x14\\x15\\x14\\U18fc0fc3\\x04\\x04\\x05\\x04\\x05\\t\\x05\\x05\\t\\x14\\r\\v\\r\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\x14\\Ufdf8f181ʁʃ\\x01\\\"\\0\\x02\\x11\\x01\\x03\\x11\\x01\\U1f9cf80\\x01\\x05\\x01\\x01\\x01\\x01\\x01\\x01\\0\\0\\0\\0\\0\\0\\0\\0\\x01\\x02\\x03\\x04\\x05\\x06\\a\\b\\t\\n\\v\\U2033380\\x02\\x01\\x03\\x03\\x02\\x04\\x03\\x05\\x05\\x04\\x04\\0\\0\\x01}\\x01\\x02\\x03\\0\\x04\\x11\\x05\\x12!1A\\x06\\x13Qa\\a\\\"q\\x142���\\b#B�\\Uffffffd5RҰ\\$3br�\\t\\n\\x16\\x17\\x18\\x19\\x1a%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�����������������������������������ÃŅǇ\\u249˒\\u514֖\\u618ښ⣣妦詩벲\\U135db6\\U239eba\\U1f9cfc0\\x03\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\0\\0\\0\\0\\0\\0\\x01\\x02\\x03\\x04\\x05\\x06\\a\\b\\t\\n\\v\\U20333c0\\x02\\x01\\x02\\x04\\x04\\x03\\x04\\a\\x05\\x04\\x04\\0\\x01\\x02w\\0\\x01\\x02\\x03\\x11\\x04\\x05!1\\x06\\x12AQ\\aaq\\x13\\\"2�\\b\\x14B���\\Uffffffc9#3R\\Ufff94872ϊ\\x16\\$4\\Ufffff9b1\\x17\\x18\\x19\\x1a&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������ÃŅǇ\\u249˒\\u514֖\\u618ښ㤤槧骪󴵵\\U1f8e79\\U4017f8c\\x03\\x01\\0\\x02\\x11\\x03\\x11\\0?\\0???ү+�\\Ue0429J��\\f�_\\x18z�\\\\#뼪ӄ0\\x02��ܴԱ0�\\x0f�\\0\\$�ː\\x0fZ\\n쳝󱟘Error showing value of type UTF8String:\r\nERROR: invalid UTF-8 character index\r\n in next at ./utf8.jl:68\r\n in print_escaped at string.jl:869\r\n in show at string.jl:69\r\n in anonymous at show.jl:1160\r\n in with_output_limit at ./show.jl:1137\r\n in showlimited at show.jl:1159\r\n in writemime at replutil.jl:2\r\n in display at REPL.jl:117\r\n in display at REPL.jl:120\r\n in display at multimedia.jl:149\r\n in print_response at REPL.jl:139\r\n in print_response at REPL.jl:124\r\n in anonymous at REPL.jl:586\r\n in run_interface at ./LineEdit.jl:1379\r\n in run_frontend at ./REPL.jl:818\r\n in run_repl at ./REPL.jl:169\r\n in _start at ./client.jl:400\r\n\r\njulia> versioninfo()\r\nJulia Version 0.3.7-pre+1\r\nCommit d15f183 (2015-02-17 22:12 UTC)\r\nPlatform Info:\r\n  System: Darwin (x86_64-apple-darwin14.1.0)\r\n  CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)\r\n  LAPACK: libopenblas\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.3\r\n\r\njulia> Pkg.installed(\"Requests\")\r\nv\"0.0.8\"\r\n```"}}