|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
klintistwood Smarty n00b
Joined: 21 Jun 2014 Posts: 2
|
Posted: Sat Jun 21, 2014 1:51 pm Post subject: Encoding issue with config file |
|
|
Hi all,
I was building a site locally on my computer with Smarty and everything was running fine. I then uploaded all the files to a server but something went wrong with the encoding and I haven't managed to solve it so far.
here is what I use in my php file:
require 'libs/Smarty.class.php';
$smarty = new Smarty;
$smarty->compile_check = true;
$smarty->debugging = true;
$smarty->config_load('../lang/en.conf');
$smarty->setTemplateDir('./templates_cms');
$smarty->display('manager.tpl');
When using this, I get an empty page. If I remove the line where the configuration is loaded ($smarty->config_load('../lang/en.conf'), my page is loaded correctly but all labels stored in the configuration file are of course missing.
The en.conf file is in UTF8 but I also tried to have it in UTF8 without BOM or ANSI but nothing works. I have tried to empty en.conf to rule out any issue with its content but the problem remains the same.
php and tpl files are in utf8. Manager.tpl only displays plain text for testing purposes, the content of this file doesn't influence the result.
Any idea?
Thanks! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jun 21, 2014 4:12 pm Post subject: |
|
|
Check if the PHP configuration on the new server has the mb_string functions enabled. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|