The problem is caused from the Tagging plug-in 1. class.tagging.plugin.php uses strtolower which does not support UTF-8 so your Unicode data are not stored in the database. A solution to problem(1) is to use mb_strtolower() (which handles Unicode but is slower) : replace : $FormTags = trim(strtolower(GetValue('Tags', $FormPostValues, ''))); //ORIGINAL line 148
with
$FormTags = trim(mb_strtolower(GetValue('Tags', $FormPostValues, ''), 'UTF-8')); //mod by trister
and
'Name' => strtolower($NewTag), // ORIGINAL line 166 (I Think)
with
'Name' => mb_strtolower($NewTag, 'UTF-8'), //mod
2. The second problem is the URL creation of the PopularTag module (class.tagmodule.php) and is cause by this statement if (urlencode($Tag->Name) == $Tag->Name) . My modification (don't know if it causes any problem -I don't have any problem so far) actually disables this if statement : replace line 61
echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged?Tag='.urlencode($Tag->Name)); //ORIG line
with
echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged/'.urlencode($Tag->Name));// mod
Tags should now be working... If you encounter any problem please post it here. If I find it works ok I'll make a modified Tagging plug-in and post it here.
Comments
which haven't been solved.
Even in Issue tracker it has no comments...
Thanks
1. class.tagging.plugin.php uses strtolower which does not support UTF-8 so your Unicode data are not stored in the database.
A solution to problem(1) is to use mb_strtolower() (which handles Unicode but is slower) :
replace :
$FormTags = trim(strtolower(GetValue('Tags', $FormPostValues, ''))); //ORIGINAL line 148with
$FormTags = trim(mb_strtolower(GetValue('Tags', $FormPostValues, ''), 'UTF-8')); //mod by tristerand
'Name' => strtolower($NewTag), // ORIGINAL line 166 (I Think)with
'Name' => mb_strtolower($NewTag, 'UTF-8'), //mod2. The second problem is the URL creation of the PopularTag module (class.tagmodule.php) and is cause by this statement
if (urlencode($Tag->Name) == $Tag->Name) .
My modification (don't know if it causes any problem -I don't have any problem so far) actually disables this if statement :
replace line 61
echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged?Tag='.urlencode($Tag->Name)); //ORIG linewith
echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged/'.urlencode($Tag->Name));// modTags should now be working...
If you encounter any problem please post it here. If I find it works ok I'll make a modified Tagging plug-in and post it here.