Forums / Setup & design / utf i18n override in an extention

utf i18n override in an extention

Author Message

risto CMS user

Friday 10 February 2006 1:04:30 am

I'm bulding an extention where I need utf8 output in an xml file. its going to be used in a flash animation so I realuy don't have an alternative.

what I have atcheaved:
If I set i18n.ini.append.php to:

[CharacterSettings]
Charset=utf8

then the flash animation is perfect. The problem the is the site it self.

Its an non utf8 mysql. And I can't doo anything about it.

If I try loading

{let $classFilter = ezini( 'Classes', 'Charset', 'i18n.ini' )}

from the extention settings It dos not override the settings.

My question is:

Is this at all posible? Would you mind showing me how?

Steph A

Friday 10 February 2006 5:31:40 am

Hello.

I got just the same probelm as you do. And I have tried to solve this for a long time now. For me its either the content of the site thats getting messed up (when UFT-8) - or the xml output produces an error because its got special chars in norwegian (iso-8859-1).

Of course everything works fine in XML when using iso-8859-1 - but then the flash application messes it up because it cant read iso-8859-1 properly.... :(

Are you using the RSS feed - or have you made a new layoutmodule? *just wondering*

Steph A

Friday 10 February 2006 8:21:27 am

By the way, also tried to convert only the infected string into utf-8, with the utf_encode parameter (in template.ini)- but it seems this doesnt work either. I only get fatal error.

But, how does the existing RSS-module output UTF-8 through template code? Because I tried inserting special chars. into the feed - and load them into an .swf file with the xml-connector, and this actually worked as intended. The chars. where displayed as normal - but through the "regular" template-override system - it does not work! What to do?

Anyone please?

Steph A

Saturday 11 February 2006 9:54:06 am

I finally made it work!

Make sure your mysql-database is set to UTF-8. Change the templates (site.ini, template.ini and i18.ini). I am also using the fck-editor, and then you also must make sure that the template literal.tpl - is encoded into UTF-8. Because this made some extra unwanted symbols in the content (two questionmarks where shown) - this is probably because the template was written with another encoding, and the data corrupted due to this conversion.

Anyway, now my content is looking fine - and my flash application (with XML connector) reads the XML output just fine (with norwegian special chars.).

:D

risto CMS user

Monday 13 February 2006 12:24:07 am

well I couldent set the databes to utf-8. but I got it to work.

in template.ini.appand.php I set this variable:

PHPOperatorList[to_utf8]=utf8_encode

and in the templates I set the spesific field to:

{$node.name|to_utf8}

eZ debug

Timing: Jan 18 2025 11:18:24
Script start
Timing: Jan 18 2025 11:18:24
Module start 'content'
Timing: Jan 18 2025 11:18:25
Module end 'content'
Timing: Jan 18 2025 11:18:25
Script end

Main resources:

Total runtime0.8560 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.8516180.8281
Module start 'content' 0.00630.7347 769.6797535.8516
Module end 'content' 0.74100.1149 1,305.5313337.3984
Script end 0.8560  1,642.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4751210.0002
Check MTime0.00150.1730210.0001
Mysql Total
Database connection0.00080.095910.0008
Mysqli_queries0.784691.65892000.0039
Looping result0.00180.21221980.0000
Template Total0.827896.720.4139
Template load0.00200.235220.0010
Template processing0.825896.466320.4129
Template load and register function0.00010.011310.0001
states
state_id_array0.00100.115410.0010
state_identifier_array0.00140.164420.0007
Override
Cache load0.00170.2017360.0000
Sytem overhead
Fetch class attribute can translate value0.00130.152330.0004
Fetch class attribute name0.00170.201060.0003
XML
Image XML parsing0.00070.082430.0002
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00340.3942270.0001
String conversion0.00000.000530.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs