Encoding problems with meta tags

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
gnolen

Encoding problems with meta tags

Post by gnolen »

Hmm,

I am trying the new beta as hell and it is still problems with encoding for germanian languages (åäö). If I choose utf-8 the titles(of the page)  of the pages are alright but the meta tags looks really strange(as how searchengines sees them, not in browser).

But if I then choose ISO 8859-1 the meta tags should look alright in a normal page but in CMS it will not. And then the titles are totally messed up...

I do not know how to solve this problem because I need my meta-tags. I tried to put the character-code of åäö instead but that didn't help.

I think it is a major problem for us...

/ Gnolen
gnolen

Re: Encoding problems with meta tags

Post by gnolen »

Just to display something...

If I do a page in CMS with no meta-tag in the template but set the encoding ISO 8859-1 in the dropdown list and have the metatags(example) like:



it will look like this 'live'(and the browser says it is ISO 8859-1):



If I then take the template(with the content) and just paste it in a php file(and upload it to the same folder as cms) and put in a meta encoding of ISO 8859-1 the same meta will show correct:



Strange, isn't? Or?

/ Gnolen
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Encoding problems with meta tags

Post by Ted »

This may seem like a weird question, but what browser are you entering your text on?
gnolen

Re: Encoding problems with meta tags

Post by gnolen »

The template text? In FF or Opera...
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Encoding problems with meta tags

Post by Ted »

This isn't tested by any means and I could be completely wrong...  BUT, I think that standards compliant browsers will automatically convert text from one encoding to another.

So, you're expecting the output to be ISO and your keymap is set to ISO, but if the header for the admin page is set to UTF8 (default in the English translation), then it's going to convert (or at least try to convert) your ISO code to UTF8 before it saves it in the database.

Best thing to do would be to change the encoding for the en lang (admin/lang/en_US.nls.php) to ISO-8859-1 and try again.  If it's still doing that, then I guess we'll have to investigate further.
gnolen

Re: Encoding problems with meta tags

Post by gnolen »

Thanks Wishy!

That did the trick!! Damn, now I know what has been wrong with my other sites, because they really behaved strange with åäö...And the problem was actually in the admin!

/ Gnolen
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Encoding problems with meta tags

Post by Ted »

Awesome.  That was such a hunch.  I'm glad it worked.

You should probably just get that Swedish translation of the admin done and that will solve your problems.  *wink wink*

Sorry, I can't resist sometimes...
gnolen

Re: Encoding problems with meta tags

Post by gnolen »

Yeah, it is your fault because you release new versions all the time! :) The old version is translated already and I will do the new beta this weekend.

/ Gnolen
Locked

Return to “CMSMS Core”