CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Character Encoding Mismatch

Print topic Send  topic

Author Message
datadoit
Posted: 08/16/2010, 3:46 PM

CCS4.3; PHP5; MySQL5

Okay, my project settings for charset is UTF-8. Encode extension is
iconv. File encoding is set to UTF-8. Default HTML encoding is set to
UTF-8. My page's encoding is set to UTF-8. When looking at the HTML of
my page, I see:

<meta http-equiv="content-type" content="application/xhtml+xml;
charset=utf-8" />

When looking at the generated PHP code for my page, I see:

$FileName = FileName;
$Redirect = "";
$TemplateFileName = "index.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$Charset = $Charset ? $Charset : "utf-8";

All looks good, right? So how come when I go to view the page source of
my page after loading it in any browser, I see:

<meta http-equiv="content-type" content="text/html; charset=windows-1252" />

This, of course, creates a markup validation error at w3.org:

"The character encoding specified in the HTTP header (utf-8) is
different from the value in the <meta> element (windows-1252). I will
use the value from the HTTP header (utf-8) for this validation."

Now, if I load the .html file directly, I get the proper meta tag:

<meta http-equiv="content-type" content="application/xhtml+xml;
charset=utf-8" />

Only when I load the .php file do I get this different meta tag. Am I
missing something somewhere? How or where is this meta tag getting
rewritten?
mamboBROWN


Posts: 1713
Posted: 08/16/2010, 5:13 PM

datadoit,
This is the first that I'm hearing about this. Have you tried contacting support to see if they have come across this issue??
View profile  Send private message
datadoit
Posted: 08/16/2010, 6:26 PM

I did miss something...

For a site with translations, hidden up under Project Settings ->
Locales and Encoding -> Site Locales -> Choose language then the Edit button

The Output Encoding there must also be set to match the project's
Default HTML and File Encoding. Excluding each page's encoding setting,
I count now four other different places that encoding must be set
appropriately for it to work.

Kinda be nice to have ONE setting for encoding, and everything defaults
to that one setting without further interaction. If you want granular
control of your encodings, only then should you have to click through
the myriad of layers to get to those other settings.

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.