aboutsummaryrefslogtreecommitdiff
path: root/doc/forum/Cannot_run_ikiwiki_due_to_Encode.pm/comment_1_3be380ae32e9e6f65d47975827950050._comment
blob: 752141c6730b3125e42a636cc76867aba8cedd88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlobQ5j7hQVIGkwMWW3yKB_DWqthJcpnsQ"
 nickname="Qi"
 subject="Fix"
 date="2015-02-25T05:43:26Z"
 content="""
I fixed it by adding
```
sub decode($$;$) {
    my ( $name, $octets, $check ) = @_;
    return undef unless defined $octets;
    return $octets if Encode::is_utf8($octets);  # add this check
	$octets .= '';
```
"""]]