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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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}