diff options
author | Eric Wong <e@yhbt.net> | 2020-05-28 18:37:08 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-05-29 19:01:04 +0000 |
commit | 846161e3d1207d59f62b3a6718221d6f5ba2b94f (patch) | |
tree | aa6a2807f842f36389daa9790864fd9b7f2ae36a /lib/PublicInbox/Inbox.pm | |
parent | ace6491217a6aa894ca82c967c42f1df168d7855 (diff) | |
download | public-inbox-846161e3d1207d59f62b3a6718221d6f5ba2b94f.tar.gz |
gitweb does the same with $GIT_DIR/description and gitweb.owner. Allowing UTF-8 description should not cause problems when used in responses for to the NNTP "LIST NEWSGROUPS" request, either, since RFC 3977 section 7.6.6 recommends the description be UTF-8 (but does not require it). Link: https://public-inbox.org/meta/20200528151216.l7vmnmrs4ojw372g@sourcephile.fr/
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 002b980f..c295b267 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -223,6 +223,7 @@ sub description { my $desc = try_cat("$self->{inboxdir}/description"); local $/ = "\n"; chomp $desc; + utf8::decode($desc); $desc =~ s/\s+/ /smg; $desc eq '' ? undef : $desc; }) // '($INBOX_DIR/description missing)'; |