Difference between revisions of "Extension talk:SearchLog.php"

From Organic Design wiki
(Add new Special:SearchLog link)
Line 15: Line 15:
 
that should now show the raw UTF-8 characters --[[User:Sven|Sven]]. If the regex converted the &'s then unicode like  '→' would also be converted to → --[[User:Sven|Sven]] 11:39, 8 February 2008 (NZDT)
 
that should now show the raw UTF-8 characters --[[User:Sven|Sven]]. If the regex converted the &'s then unicode like  '→' would also be converted to → --[[User:Sven|Sven]] 11:39, 8 February 2008 (NZDT)
 
: Can you download the new version and see if it what you want, you can test it on this wiki at [[Special:SearchLog]] --[[User:Sven|Sven]] 12:11, 8 February 2008 (NZDT)
 
: Can you download the new version and see if it what you want, you can test it on this wiki at [[Special:SearchLog]] --[[User:Sven|Sven]] 12:11, 8 February 2008 (NZDT)
 +
:: That does not help. If yor need, I could send you my log - it is small. By the way, in the code you wrote
 +
{{code|<php>
 +
$k = preg_replace("/&/", "&#38;", $k);
 +
</php>
 +
}}
 +
:: what is correct? And [[Special:SearchLog]] does not work: I see no statistic. --[[User:Konstbel|Konstbel]] 06:17, 13 February 2008 (NZDT)

Revision as of 17:17, 12 February 2008

Problem with UTF8 chars

The search log incorrectly displays UTF-8 characters (as black diamonds with question sign inside). Could you help to fix that?

The UTF-8 is converted automatically when in the source code of an html page, to stop it rendering you need to escape wither the & or the # with its UTF-8 code e.g.
To display ¼ as &#188;
you can use a regular expression to convert the # into &#35; --Sven 11:32, 8 February 2008 (NZDT)
At about line 95 if you change the for loop to;
{{{1}}}

that should now show the raw UTF-8 characters --Sven. If the regex converted the &'s then unicode like '→' would also be converted to &rarr; --Sven 11:39, 8 February 2008 (NZDT)

Can you download the new version and see if it what you want, you can test it on this wiki at Special:SearchLog --Sven 12:11, 8 February 2008 (NZDT)
That does not help. If yor need, I could send you my log - it is small. By the way, in the code you wrote
{{{1}}}
what is correct? And Special:SearchLog does not work: I see no statistic. --Konstbel 06:17, 13 February 2008 (NZDT)