Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 14

CurtisOdenKogalniceanuericgilletteslaretibartfastwykthreed +9 guests

Tagging does not work with other languages tags (eg greek or russian)

discussions/tagged&Tag=Δοκιμή
Clicking on tag "Δοκιμή" displays an empty result because it does not recognise the encoding

(message displayed is Questions tagged with '')

Comments

  • I think this problem is similar with this : http://vanillaforums.org/discussion/12703/utf-8-tagging

    which haven't been solved.
    Even in Issue tracker it has no comments...
    Thanks
  • 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.
Sign In or Register to comment.