CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 [CCS 3.1] Template encoding

Print topic Send  topic

Author Message
amisoft

Posts: 3
Posted: 07/26/2007, 4:37 PM

Hi,

I have a problem with Templace encoding.

My main page 'index.ccp' has an HTML file who encoding is utf-8.

In Page_AfterInitialize, I would change my Template file by another one :

global $TemplateFileName;  
$TemplateFileName = 'newfile.html'

newfile.html have another encoding : ISO-8859.1 and my page does not display, codecharge send ISO-8859-1 character with an header and meta charset set to utf-8..

In index.php, I see a variable $TemplateEncoding who apparently contains the original charset : utf-8.

So in Page_AfterInitialize, I add :

global $TemplateEncoding;  
$TemplateEncoding = 'iso-8859-1';

By the problem was already here because in index.php, there is a line later :

$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8", "replace");

and in this line, the original encoding is hard-coded (generated when I publish my project): "UTF-8".

How can I change this hardcoded value ?

To summarize : I want to keep my project with encoding 'utf-8' and change template file on the fly whith a different encoding (without manualy modified index.php every time I rebuild my project).

Eric.

P.S. Sorry for my poor english, I'm french.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.