[geeklog-devel] Feed handling of Danish
Michael Jervis
mjervis at gmail.com
Mon Apr 28 14:45:17 EDT 2008
Dirk,
Checking back in on this:
http://www.geeklog.net/forum/viewtopic.php?showtopic=82353
I'm confused!
In 1.611 of lib-common.php you committed support for UTF-8 feeds.
COM_rdfimport checks the charset of a Geeklog instance:
$charset = COM_getCharset();
// format articles for display
$readmax = min($maxheadlines, count($feed->articles));
for ($i = 0; $i < $readmax; $i++) {
if (empty($feed->articles[$i]['title'])) {
$feed->articles[$i]['title'] = $LANG21[61];
}
if ($charset == 'utf-8') {
$title = $feed->articles[$i]['title'];
} else {
$title = utf8_decode($feed->articles[$i]['title']);
}
So, we get the charset of a Geeklog instance,and if it's UTF-8 we do
nothing to the title, if it's not, we utf8_decode the title.
The feed in question is iso-8859-1 and my Geeklog instance is
iso-8859-1. So in this case we're UTF8 decoding something that isn't
UTF-8 and loosing the special characters.
I believe the correct option is to utf8_decode if and only if the feed
is UTF-8 and the site is not. But I'm confused due to the deliberate
implementation of this logic.
Opinions?
--
Michael Jervis
mjervis at gmail.com
504B03041400000008008F846431E3543A820800000006000000060000007765
62676F642B4F4D4ACF4F0100504B010214001400000008008F846431E3543A82
0800000006000000060000000000000000002000000000000000776562676F64
504B05060000000001000100340000002C0000000000
More information about the geeklog-devel
mailing list