Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Encoding issue with config file

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
klintistwood
Smarty n00b


Joined: 21 Jun 2014
Posts: 2

PostPosted: Sat Jun 21, 2014 1:51 pm    Post subject: Encoding issue with config file Reply with quote

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')Wink, 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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Jun 21, 2014 4:12 pm    Post subject: Reply with quote

Check if the PHP configuration on the new server has the mb_string functions enabled.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP