Bug #19193
closedCharset problems if caching is not enabled (config.no_cache = 1)
0%
Description
Typo3 4.2.1
PHP 5.2.0-8+etch10
MySQL 5.0.32
DB, Typo3-FE & -BE is using utf-8. typo3conf
$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8;';
mysql> show variables where variable_name like '%char%';----------------------------------------------------+
| Variable_name | Value |----------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ | ----------------------------------------------------+
Insert a HTML-Element on any page with content "»" is working without problems, as long as "config.no_cache = 1" is set.
After enabling caching "»" results in an unknown symbol (=> ?) and the html-source stored in the field "HTML" in table "cache_pages" is cut off after this point. On next reload the cached (but destroyed) source is delivered to the browser.
If I insert the Symbol by copy&paste from a Website like http://unicode.e-workers.de/entities.php everything works OK. But this is no solution, as for example newscalendar uses "»" and "«" for navigation etc...
I could not reproduce this error on another typo3-installation at the same server, but cannot see any significant difference between the installations.
The field "HTML" in "cache_pages" is "mediumtext", could this issue be related to something like this:
2007-04-02 Michael Stucki <michael@typo3.org>- Fixed bug #17053: Cache is not saved properly because of charset conflict in the database. Changing the field type of cache_hash.content from mediumtext to mediumblob. To make this work, you need to compare your database in the Install Tool.
=> After changing fieldtype to mediumblob, the whole source is saved into "HTML", but "»" is still an unknown symbol in the FE.
(issue imported from #M9120)
Updated by Andreas Dörler over 16 years ago
Sorry, the html-entities have been replaced after submitting the bug report.
Insert a HTML-Element on any page with content "»" is working without problems, as long as "config.no_cache = 1" is set.
should be:
Insert a HTML-Element on any page with content "»" is working without problems, as long as "config.no_cache = 1" is set.
AND
If I insert the Symbol by copy&paste from a Website like http://unicode.e-workers.de/entities.php [^] everything works OK. But this is no solution, as for example newscalendar uses "»" and "«" for navigation etc...
should be
If I insert the Symbol by copy&paste from a Website like http://unicode.e-workers.de/entities.php [^] everything works OK. But this is no solution, as for example newscalendar uses "&raqou;" and "«" for navigation etc...
Updated by Christian Brunner over 16 years ago
i'm not sure, but i think i had a similar problem. i my case umlauts (ä,ö,ü) were destroyed.
try to set
$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8'.chr(10).'SET CHARACTER SET utf8';
i my case that solved the problem
Updated by Andreas Dörler over 16 years ago
Hi Christian,
I've already tried
$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8'.chr(10).'SET CHARACTER SET utf8';
without success.
I got that hint from here:
http://www.typo3forum.net/forum/typo3-4-x-fragen-probleme/22719-probleme-zeichenkodierung-caching.html
I did not have any problems with german umlauts on this installation yet.
Updated by Andreas Dörler over 16 years ago
Category of this report should be: [- TYPO3 Core -]
Updated by Markus Bischof over 16 years ago
Same here. I have a fresh installation with 4.2.1. Error occured at in the HTML Source
Updated by Andreas Dörler over 16 years ago
I think I've found the reason in tidy.
After disabling Tidy again with $TYPO3_CONF_VARS['FE']['tidy'] = '0'; all is working as expected!
Tidy does (in the default case) only "beautify" the content before it goes to cache, that's why nothing happend if cache is disabled.
@Markus: Could you please check if tidy is enabled in your installation!
Updated by Markus Bischof over 16 years ago
I can confirm that. After disabling tidy in the install tool everything worked fine again!
Updated by Christian Brunner over 16 years ago
hey dmitry, i think you corrected the title the wrong way. he has problems when caching is enabled!
so the title should be only "Charset problems if caching is enabled" i think
greez
Updated by Christian Kuhn over 14 years ago
Resolved, no change required. Afaik tidy needs some hinting to handle charsets properly.