Forums / Install & configuration / Characters are not properly display in HTML Custom Tags

Characters are not properly display in HTML Custom Tags

Author Message

Daniel Iribarren

Friday 13 February 2009 12:47:39 pm

Hi,

In order to insert and HTML into an eZ Publish page I created a Custom Tag .
And when I see it on my web page eZ Publish doesn't render the accents characters properly.

I am using esl-ES locale for a Spanish siteaccess, and I do not have problem rendering content with accents as far as they are in the Online Editor, but not if they are in the code of the HTML form of the Custom Tag.

The information that it renders from my HTML custom tag is:

"Subscripci�n a la Publicaci�n de SWP"

and it should be (as it appears in the HTML code that is in the Custom Tag

"Subscripción a la Publicación de SWP"

I suspect that the problem is with the charset that is being rendered.

If I inspect the code of the page rendered I found that is using charset="utf-8". I do not why, because if I inspect the charset that is using my locale file for the Spanish translation is charset="iso-8859-1"

What do you think may causing the problem?

Any thought?

Steven E. Bailey

Saturday 14 February 2009 1:01:05 am

Look at i18n.ini (or whatever applicable override file). The default is charset is utf-8

[CharacterSettings]
Charset=utf-8

If the character set of your database is different from what this value is, it could cause problems.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Daniel Iribarren

Tuesday 17 February 2009 6:04:08 am

Hi Steven,

Thanks very much for your feedback.

My guess was wrong.

I tried to change the default charset but it did not worked.

Also, I validate DB and it is fine because as I mentioned content populated via online is displayed properly.

The problem was another source.

The editor I was using to create the .tpl file for the custom tag was set to use Western (Mac OS Roman) and it should set to UTF-8.

So here is the solution in case anybody needs.