Re: Switching to UTF-8. Need help.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy wrote:
Hi to all, We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough. I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems. If I make an echo 'möbel, Belgien' the browser does not show me the correct character. If I look in the source of the document the character is good. Default encoding of the browser is UTF-8. If I change manually the browser encoding then the chars are showed correclty. We have a lot of "defines" with fix texts, which are full with german and french characters. Any of these aren't shower correctly.
What is the workaround for this?

workaround suggest there is no real fix.

but in this case your probably outputting the wrong charset declaration in the HTML
source (or not at all, in which case the browser is guessing the chArset incorrectly):

so either a line like this in the <head> of your page:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">


alternatively if your outputting a form of XML somthing like this
at the top of your output:

<?xml version="1.0" encoding="UTF8" ?>


ALSO check the headers being output with your pages....
there should be a header like:

Content-Type: text/html; charset=UTF-8


and take a look here (it might help to figure out whats wrong exactly):

	http://www.validome.org/lang/en/errors/XML-CHARSET



Best regards, Andy.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux