« Return to Thread: Would an XML Sitemap Generator Module for ZF make sense?

Re: XML generated menu renders incorrect character encoding

by Joakim Gerth :: Rate this Message:

Reply to Author | View in Thread

It did not help to download the 1.8.4 release.

To summarize, in bootstrap charset=iso-8859-1 is set. I am generating a menu with swedish characters from a xml file.

Scenarios:

1. Bootstrap iso-8859-1, xml utf-8: inline text generated correctly, menu displays Böcker instead of böcker.

2. bootstrap iso-8859-1, xml iso-8859-1: Same as above.

3. Bootstrap utf-8, xml iso-8859-1: Menu looks correct, inline text displays b�rjar instead of börjar.

4. Bootstrap uft-8, xml utf-8: Same as 3)

Could anyone please help out with this? How should I solve it?

Regards,
Joakim

Joakim Gerth skrev:
Actually it could be a manifestation of http://framework.zend.com/issues/browse/ZF-6857. I will try out the latest version and take it from there.

On Wed, Jul 1, 2009 at 7:34 AM, Joakim Gerth <armarna@...> wrote:
I am not sure how to do this. You are not talking about setting up the encoding inside the xml file and my layout file (which is done). I am using the Eclipse PDT that i suppose should have the same encoding set for all files.

Could you give me an example on how to make point 2 below?

Regards,
Joakim


On Mon, Jun 22, 2009 at 7:55 AM, Jonathan Maron <jonathan.a.maron@...> wrote:
Switching from ISO-8859-1 to UTF-8 can be tricky.

Here are a few things to check:

1. Your site returns the UTF-8 header.
2. All your PHTML/PHP/XML files are encoded in UTF-8.
3. You use multibyte functions to analyze strings (see: http://is.gd/18VwB).

In your case, I would guess that you have a mix of ISO-8859-1 and
UTF-8 encoded files -- this often creates a lot of problems.

Following step #2 above should solve the problem.

Jonathan Maron



On Mon, Jun 22, 2009 at 7:22 AM, Joakim Gerth <armarna@...> wrote:
>
> Hi all,
>
> I am using zend_navigation to render my menus. The navigation container is built from a xml configuration file.
>
> My problem is that the site is in swedish, hence a lot of 'åäö'. The site uses iso-8859-1 to render them correctly. However, these characters are incorrect when using the xml config. I have tried to change xml encoding to iso.. but nothing changes. If I change the encoding of entire site (made in bootstrap) to utf-8 the menus are displaye correct , but the site content is now corrupt.
>
> Could anyone help out here?
>
> Regards,
> Joakim
>



 « Return to Thread: Would an XML Sitemap Generator Module for ZF make sense?