]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/garbled_non-ascii_characters_in_body_in_web_interface.mdwn
0047830d6bbbf1dbb1bf0f8baad846ae9a35a717
[ikiwiki.git] / doc / bugs / garbled_non-ascii_characters_in_body_in_web_interface.mdwn
1 since my latest jessie upgrade here, charsets are all broken when editing a page. the page i'm trying to edit is [this wishlist](http://anarc.at/wishlist/), and it used to work fine. now, instead of:
2
3 `Voici des choses que vous pouvez m'acheter si vous êtes le Père Nowel (yeah right):`
4
5 ... as we see in the rendered body right now, when i edit the page i see:
6
7 `Voici des choses que vous pouvez m'acheter si vous �tes le P�re Nowel (yeah right):`
8
9 ... a typical double-encoding nightmare. The actual binary data is this for the word "Père" according to `hd`:
10
11 ~~~~
12 anarcat@marcos:ikiwiki$ echo "Père" | hd
13 00000000  50 c3 a8 72 65 0a                                 |P..re.|
14 00000006
15 anarcat@marcos:ikiwiki$ echo "P�re" | hd
16 00000000  50 ef bf bd 72 65 0a                              |P...re.|
17 00000007
18 ~~~~
19
20 > I don't know what that is, but it isn't the usual double-UTF-8 encoding:
21 >
22 >     >>> u'è'.encode('utf-8')
23 >     '\xc3\xa8'
24 >     >>> u'è'.encode('utf-8').decode('latin-1').encode('utf-8')
25 >     '\xc3\x83\xc2\xa8'
26 >
27 > A packet capture of the incorrect HTTP request/response headers and body
28 > might be enlightening? --[[smcv]]
29
30 Clicking on the Cancel button yields the following warning:
31
32 ~~~~
33 Error: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 215.
34 ~~~~
35
36 The apache logs yield:
37
38 ~~~~
39 [Mon Sep 08 16:17:43.995827 2014] [cgi:error] [pid 2609] [client 192.168.0.3:47445] AH01215: Died at /usr/share/perl5/IkiWiki/CGI.pm line 467., referer: http://anarc.at/ikiwiki.cgi?do=edit&page=wishlist
40 ~~~~
41
42 Interestingly enough, I can't reproduce the bug here (at least in this page). Also, editing the page through git works fine.
43
44 I had put ikiwiki on hold during the last upgrade, so it was upgraded separately. The bug happens both with 3.20140613 and 3.20140831. The major thing that happened today is the upgrade from perl 5.18 to 5.20. Here's the output of `egrep '[0-9] (remove|purge|install|upgrade)' /var/log/dpkg.log | pastebinit -b paste.debian.net` to give an idea of what was upgraded today:
45
46 http://paste.debian.net/plain/119944
47
48 This is a major bug which should probably be fixed before jessie, yet i can't seem to find a severity statement in reportbug that would justify blocking the release based on this - unless we consider non-english speakers as "most" users (i don't know the demographics well enough). It certainly makes ikiwiki completely unusable for my users that operate on the web interface in french... --[[anarcat]]