By: Jost aus Soest
Empty Fields after Update to PHP 5.4 - htmlspecialchars Bug
I had to update to PHP 5.4 and since than the output fields like [obj.field] are showing nothing, when the data for the field contains a special character (like an Umlaut "Ä").
But special characters coded in the templates are still shown.
I've searched for the reason and have found, that with PHP 5.4 the default charset is changed to UTF-8 (and not ISO-8859-1):
https://bugs.php.net/bug.php?id=61354 ==> htmlspecialchars() deliviers empty strings!?!
But till now I haven't found an easy workaround to deal with this problem.
So, what can I do?
All my TBS-websites are envolved with so many templates, so to add some modifier to all the [obj.field]-outputs is not a viable option.
Hint: All the data is stored in thousands of text files.
Is there a config-option in TBS to deal with this problem?
OK, I finally found the solution!
As information for others (lost like me) here the solution:
$TBS->LoadTemplate('frame.htm', false); // charset false = non convert special characters
Re: Empty Fields after Update to PHP 5.4 - htmlspecialchars Bug
Thanks for the PHP 4 information and the tip :-)