Elxis CMS Forum

Support => General => Topic started by: maple on March 09, 2010, 19:12:40

Title: [Solved] Characters problems when I enable cache static
Post by: maple on March 09, 2010, 19:12:40
Hello,

I've SEO Pro and the cache static enabled.
SEO PRO works well but cache static return the following in front-end on the Internet Explorer 6, 7, and 8.

Example:

Instead of Glòria show Glòria
Instead of Últimes  show Últimes

... and so on... the whole website.

Thank you.
Title: Re: Characters problems when I enable cache static
Post by: Ivan Trebješanin on March 09, 2010, 19:53:37
In that case, it's only browser problem... set encoding to unicode.
Title: Re: Characters problems when I enable cache static
Post by: maple on March 09, 2010, 22:04:54
In that case, it's only browser problem... set encoding to unicode.


Thank you for your response. Yes, I know this solution. The problem is that the browser change automatically to another encoding.

The majority of the people don't know that can solve this problem changing the encoding browser.

I don't know why if I turn on the Elxis cache static, Internet Explorer browser change automatically to another enconding. I haven't the marked "automatic selection" in the browser. I need that the Internet Explorer browsers don't change automatically the encoding...



Title: Re: Characters problems when I enable cache static
Post by: maple on March 12, 2010, 15:09:38


Also problems with "automatic selection" encoding marked in the browser, change automatically from utf 8 to another one.

Why go out the utf 8 browser enconding if I turn on the Elxis static cache?

Thanks
Title: Re: Characters problems when I enable cache static
Post by: datahell on March 12, 2010, 22:09:08
Check if the cached files are saved as utf-8 or iso-8859-1 (ANSI). Open one with a text editor to check it.
If Elxis saves them as ansi you should add something like:

header('Content-type: text/html; charset=utf-8');

somewhere or in apache's default encoding or in htaccess or elsewhere

This problem may appear because your server sends a default set of headers before elxis runs. So, it might be a web server set up issue.
Title: Re: Characters problems when I enable cache static
Post by: maple on March 13, 2010, 14:37:24
Check if the cached files are saved as utf-8 or iso-8859-1 (ANSI). Open one with a text editor to check it.
If Elxis saves them as ansi you should add something like:

header('Content-type: text/html; charset=utf-8');

somewhere or in apache's default encoding or in htaccess or elsewhere

This problem may appear because your server sends a default set of headers before elxis runs. So, it might be a web server set up issue.

Works well, Yeah! Thank you very much for yor response.
So, I just checked cached files and I can see the following:

Code: [Select]
<?xml version="1.0" encoding=" UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ca" xml:lang="ca>
<head>
<meta http-equiv="Content-Type" content="text/html; charset = UTF-8" />

So, that's ok, but doesn't work.

Then I just added the following line into .htacess file:

Code: [Select]
AddDefaultCharset UTF-8
And yes! Lastly, works fine!

The problem, like datahell say, the server sends iso-8859-1 (ANSI) as a default set of headers before elxis runs.

This is for all people that can have the same problem.

Thanks datahell
Title: Re: [Solved] Characters problems when I enable cache static
Post by: datahell on March 13, 2010, 14:55:37
I did nt mean what the cached files write inside (utf-8) them but how they were saved. But as you solved the problem this does nt matter any more. You did the right fix!

Something I noticed in your template's headers:
this is wrong (the right quote is missing):
xml:lang="ca>
corrected:
xml:lang="ca">
Open your template's index.php and fix it.
Title: Re: [Solved] Characters problems when I enable cache static
Post by: maple on March 13, 2010, 15:19:22
I did nt mean what the cached files write inside (utf-8) them but how they were saved. But as you solved the problem this does nt matter any more. You did the right fix!

Something I noticed in your template's headers:
this is wrong (the right quote is missing):
xml:lang="ca>
corrected:
xml:lang="ca">
Open your template's index.php and fix it.

Ooh, how they were saved! I did not understand. Thanks datahell. Yeah, all works fine now.  And I just corrected the "ca" I had not seen this error, thanks!