Forums / Developer / Change charset appearing in meta tag

Change charset appearing in meta tag

Author Message

Eirik Alfstad Johansen

Thursday 05 October 2006 4:25:14 am

Hi,

I'm upgrading a 3.5.0 site to 3.8.4, and I have a few questions regarding switching from iso to utf-8 charset.

1. How do I change the charset which appears in the meta tag content-type when I make use of the page_head.tpl template?

2. I have the following line at the top of my pagelayout.tpl override:

{*?template charset=iso-8859-1?*}

When I try to change it to utf-8 through the admin interface, it's automatically converted back to iso.

Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Claudia Kosny

Thursday 05 October 2006 5:04:05 am

Hi Eirik

1) in i18.ini.append.php, although you should be careful as this might influence other charsets as well (e.g database connection)

2) no idea (I never use the admin interface for creating or changing templates so I frankly don't even know what you mean...)

Greetings from Luxembourg

Claudia

Ɓukasz Serwatka

Thursday 05 October 2006 5:11:32 am

in settings/override/template.ini.append.php set correct charset for templates. utf-8 in your case.

[CharsetSettings]
DefaultTemplateCharset=utf-8

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eirik Alfstad Johansen

Thursday 05 October 2006 10:38:15 am

Hi guys,

Thanks for your input. Here's a quick summary of what I've done so far with regards to charset and the database:

1. Exported the content from the 3.5.0 database.
2. Created a new database for the 3.8.4 installation with the utf-8 charset.
3. Imported the contents of the 3.5.0 database.
4. Run the various sql updates and associated scripts.
5. Run the SQL commands posted at the last entry in this post:

http://ez.no/community/forum/general/convert_from_iso_8859_1_encoding_to_utf_8

6. Set Charset in [DatabaseSettings] to utf-8.

So far, I get attributes of the xml datatype displayed correctly. However, attributes built upon the textline datatype for instance, display special (Norwegian) characters incorrectly.

I also tried changing to utf-8 in i18n.ini, but that just made the xml blocks messy as well.

Please advice.

Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/