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/

eZ debug

Timing: Jan 21 2025 16:06:56
Script start
Timing: Jan 21 2025 16:06:56
Module start 'content'
Timing: Jan 21 2025 16:06:56
Module end 'content'
Timing: Jan 21 2025 16:06:56
Script end

Main resources:

Total runtime0.3194 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.8516180.8281
Module start 'content' 0.00680.0128 769.679798.0078
Module end 'content' 0.01970.2997 867.6875526.1719
Script end 0.3194  1,393.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.1645200.0002
Check MTime0.00140.4341200.0001
Mysql Total
Database connection0.00080.246410.0008
Mysqli_queries0.258080.76441410.0018
Looping result0.00140.42541390.0000
Template Total0.299293.610.2992
Template load0.00100.305610.0010
Template processing0.298293.342510.2982
Override
Cache load0.00070.217610.0007
Sytem overhead
Fetch class attribute can translate value0.00090.273910.0009
XML
Image XML parsing0.00050.162510.0005
General
dbfile0.01334.1719200.0007
String conversion0.00000.001830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs