eZ Community » Forums » eZ Publish 5 Platform » Charset problems when rendering data...
expandshrink

Charset problems when rendering data from XML field

Charset problems when rendering data from XML field

Tuesday 03 February 2015 8:41:26 pm - 7 replies

When rendering an XML field (and only those based on the XML field type), the Norwegian characters æ, ø and å are not rendered correctly. The site in question is developed as a new siteaccess on the 5.x stack (legacy_mode: false), upon an installation already containing a site based on the legacy stack.

When accessing the same content in legacy stack templates, the norwegian characters appear as they should. Are there any specific charset settings I should be aware of for the new stack (and for XML fields in particular)?

Wednesday 04 February 2015 3:15:02 pm

Does the database have UTF collation?

Wednesday 04 February 2015 4:38:37 pm

Yes, both the database, table and field.

Tuesday 10 February 2015 5:12:35 pm

Hi Eirik,

is there anything specific about XML field to be aware of?

I tried reproducing this on Demo site, but it works as expected for me.

.. To answer you question, there are no charset specific settings in new stack. It is supposed to work with UTF-8.

Modified on Tuesday 10 February 2015 5:25:41 pm by Petar Španja

Tuesday 10 February 2015 6:59:43 pm

Hi Petar,

> is there anything specific about XML field to be aware of?

Not that I'm aware of. I've also tried this with several different fields based on the XML field type on several different content types, and they all produce the same problem. This indicates that the problem is somewhere in the XML field type itself. But apart from that I have no idea where to look. The content_fields.html.twig template has not been overriden, not should the XML new stack field type have experienced any tampering.

Tuesday 10 February 2015 9:08:07 pm

Few more questions that you probably already ruled out, but maybe worth trying:

  • accessing in legacy templates means still through new stack but with legacy template fallback?
  • if not, is UTF-8 charset correctly set in HTML head Content-Type meta element?
  • if it is, does it happen with new content you create as well? (thinking maybe database was at some point converted to UTF-8 but not correctly)
  • what exact eZ Publish version this happens on?

Cheers,

Petar

Tuesday 10 February 2015 11:25:18 pm

Maybe also:

  • What version of eZ Publish was the database first created with?

Modified on Tuesday 10 February 2015 11:26:37 pm by André R

Wednesday 11 February 2015 9:13:54 am

> accessing in legacy templates means still through new stack but with legacy template fallback?

Just to be clear: The problem I'm having is when using the field in an all new stack (no legacy mode). When rendering the same data in a legacy siteaccess (with only legacy templates) the content is rendered correclty.

> if not, is UTF-8 charset correctly set in HTML head Content-Type meta element?

Yes.

> if it is, does it happen with new content you create as well? (thinking maybe database was at some point converted to UTF-8 but not correctly)

Yes, it happens with both existing and new content.

> what exact eZ Publish version this happens on?

5.3.4

> What version of eZ Publish was the database first created with?

We have upgraded the installation from eZ Publish Community 2012.1 (allthough I can not be certain that the installation has not been upgraded in the past)

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from