aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn
blob: b9452a5ef11f0c00f6379eccdb2a2aec92b68cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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.

We get the following error in a password reset:

    Error: Wide character in subroutine entry at /usr/share/perl5/Mail/Sendmail.pm line 308.

Help! :) --[[anarcat]]

> I assume this means Mail::Sendmail doesn't know how to send Unicode
> strings, so any string passed to it (or any message body, or something?)
> will need to be passed through `encode_utf8()`. It looks as though
> Mail::Sendmail also defaults to
>
>     Content-Type: 'text/plain; charset="iso-8859-1"'
>
> so it'll need a `'Content-Type' => 'text/plain; charset="utf-8"'`
> too.
>
> I'm disappointed to see how many of the library modules used by ikiwiki
> are not Unicode-clean... but then again, Mail::Sendmail was last released
> in 2003 so it's hardly surprising. I wonder whether [[!cpan Email::Sender]]
> is any better?
>
> (If you know Python 2, the analogous situation would be "doesn't
> know how to send unicode objects, so you have to get a str object
> with `a_unicode_object.encode('utf-8')`".) --[[smcv]]

>> Shameless plug: [[todo/passwordauth:_sendmail_interface]].  Though, I have
>> no idea whether that is UTF-8-safe.  --[[tschwinge]]