[cgi-wiki-dev] UTF-8, Node names, and recent changes
Tom Insam
cgi-wiki-dev@earth.li
Wed, 15 Dec 2004 20:48:10 +0000
--Apple-Mail-5-282439257
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
I found a bug with the CGI::Wiki utf8 support - node names in the
recent changes list weren't getting handled as utf-8 properly. This
fixes it.
--Apple-Mail-5-282439257
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="recent_changes.diff"
Content-Disposition: attachment;
filename=recent_changes.diff
Index: lib/CGI/Wiki/Store/Database.pm
===================================================================
--- lib/CGI/Wiki/Store/Database.pm (revision 1400)
+++ lib/CGI/Wiki/Store/Database.pm (working copy)
@@ -910,7 +910,8 @@
}
#print "\n\n$sql\n\n";
my $nodesref = $dbh->selectall_arrayref($sql);
- my @finds = map { { name => $_->[0],
+ my @finds = map { @$_ = $self->charset_decode(@$_);
+ { name => $_->[0],
version => $_->[1],
last_modified => $_->[2] }
} @$nodesref;
--Apple-Mail-5-282439257
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
tom
--Apple-Mail-5-282439257--