]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn
new bug report
[ikiwiki.git] / doc / bugs / password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn
1 Similar to [[bugs/syslog_fails_with_non-ASCII_wikinames]], this bug happens when the wiki name has non-ascii characters in the site name. In my case, it has the "CⒶTS" string.
2
3 We get the following error in a password reset:
4
5     Error: Wide character in subroutine entry at /usr/share/perl5/Mail/Sendmail.pm line 308.
6
7 Help! :) --[[anarcat]]
8
9 > I assume this means Mail::Sendmail doesn't know how to send Unicode
10 > strings, so any string passed to it (or any message body, or something?)
11 > will need to be passed through `encode_utf8()`. It looks as though
12 > Mail::Sendmail also defaults to
13 >
14 >     Content-Type: 'text/plain; charset="iso-8859-1"'
15 >
16 > so it'll need a `'Content-Type' => 'text/plain; charset="utf-8"'`
17 > too.
18 >
19 > I'm disappointed to see how many of the library modules used by ikiwiki
20 > are not Unicode-clean... but then again, Mail::Sendmail was last released
21 > in 2003 so it's hardly surprising. I wonder whether [[!cpan Email::Sender]]
22 > is any better?
23 >
24 > (If you know Python 2, the analogous situation would be "doesn't
25 > know how to send unicode objects, so you have to get a str object
26 > with `a_unicode_object.encode('utf-8')`".) --[[smcv]]
27
28 >> Shameless plug: [[todo/passwordauth:_sendmail_interface]].  Though, I have
29 >> no idea whether that is UTF-8-safe.  --[[tschwinge]]