Browse Source

fix broken utf in topics (fixes #57)

Byron Jones 6 years ago
parent
commit
cce2bd8df9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/LogBot/Web/Util.pm

+ 2 - 1
lib/LogBot/Web/Util.pm

@@ -300,7 +300,8 @@ sub addressed_nick {
 sub channel_topics {
     my ($config) = @_;
     my $dbh = dbh($config, cached => 1);
-    return { map { $_->[0] => $_->[1] } @{ $dbh->selectall_arrayref('SELECT channel,topic FROM topics') } };
+    return { map { $_->[0] => decode('UTF-8', $_->[1]) }
+            @{ $dbh->selectall_arrayref('SELECT channel,topic FROM topics') } };
 }
 
 1;