[TYPO3-english] vge_tagcloud and proper handling of UTF-8 tags

Alex Tempara AlexTempara-199882 at yahoo.de
Thu Apr 14 10:00:22 CEST 2011


Thanks for the help.
Another note: Be careful if you are using vge_tagcloud in combination 
with other extensions like 'wf_tagcloud_bl' in an UTF-8 environment with 
special chars.

In my case, the tipps of Francois and Jigal were helpful but finaly i 
had to disable wf_tagcloud_bl.
It seems that this extension is also not UTF-8 aware. So far I have not 
found a way to correct this. It's a little bit tricky. Do you have an 
idea how to fix that?

The extension 'gh_multitag' is not affected.

Cheers
Alex



>> There is however an easy solution: use the modifier 'u'. [1] It can
>> reduce performance, but at least you have a UTF-8 aware regular
>> expression.
>>
>> [1] http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
>
> And now tested with vge_tagcloud and it works fine.
>
> Alex, however you won't be able to make this change in TypoScript,
> because of the way it's interpreted for now. You'll need to hack the
> code of the "pi1" plugin yourself. Edit class.tx_vgetagcloud_pi1.php, go
> to line 408:
>
> $rawKeywords = preg_split('/' . addcslashes($this->conf['splitWords'],
> "'/") . '/', strip_tags($row[$aField]));
>
> and change it too:
>
> $rawKeywords = preg_split('/' . addcslashes($this->conf['splitWords'],
> "'/") . '/u', strip_tags($row[$aField]));
>
> The only difference is the "u" added after the last slash.
>
> The usage of the "splitWords" property needs to be changed to include
> the regexp delimiters so that people can enter modifiers too. I hadn't
> thought about that originally. I'll use your bug report to cover this
> issue.
>
> Cheers
>



More information about the TYPO3-english mailing list