Reputation: 31
I hope someone can help me with this issue. For a few months (since last August) there has been an ongoing issue on my site with strange characters appearing all over the place - especially in user generated content.
I have searched and searched for answers but nothing ever seems to work, although the most pressing (in the blog component) has been resolved by setting JCE to validate HTML - which is does fine in the Blogging component (EasyBlog) but doesn't anywhere else (where it is less critical but still an issue).
Here is what I have done so far:
utf8_general_ci
AddDefaultCharset UTF-8
and AddCharset UTF-8
.php to the .htaccess files. I played about with these for ages and these two seemed to be the only combination which didn't crash the site. UTF-8
) I have tried a hack to force the connection script to UTF-8
but this causes the site to crash.
If anyone has any ideas at all as to what I can do still ... I'm all ears (please)
Many thanks in advance
Upvotes: 0
Views: 2052
Reputation: 9330
If your server is running PHP 5.4+ I would suggest that you try the following solution described in the JCE forums:
In the Editor Global Configuration, set "
Entity Encoding
" to "UTF-8
"In the "Custom Configuration Variables" field, add:
keep_nbsp:0
The keep an eye out for the JCE 2.3.2 release which will address this issue.
Things to note:
the problem is Joomla! 2.5.x's use of get_html_translation_table()
which relies on default values and PHP 5.4 changed the default encoding
parameter to UTF-8
. Previously it defaulted to ISO-8859-1
For the core you could try and modify _decode()
in /libraries/joomla/filter/input.php
, look for the line (around 644):
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
and change it to:
$trans_tbl = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT, 'ISO-8859-1');
Upvotes: 2