MySQL Forums
Forum List  »  PHP

Unwanted character conversions
Posted by: Robert Hairgrove
Date: February 11, 2013 11:07AM

Hello, I am seeing the reverse of the usual problems associated with displaying extended characters on my web pages which are generated with PHP. The database is set up with everything in utf8 character set. The German Umlaut characters such as äöü are all being displayed correctly, but I have one email address with "oe" in plain text which is being converted to "ö". However, it is showing up as "?" on the webpage.

Strangely enough, there are other email addresses which have "ue", for example, that do not get converted! In each case, my function in the MySQL backend returns the correct text when called from phpMyAdmin. Obviously, either the server or the client is trying to convert "oe" to the Latin1 / ISO-8859-1 equivalent for German.

The server is running MySQL 5.0.51a-24+lenny5 and PHP 5.2.6-1+lenny16. I am running Linux Ubuntu 10.04 LTS locally, locale is English-US, and I am seeing the same results on Firefox and Google Chrome. The PHP file generating the table has as the first line:

header("Content-Type: text/html; charset=UTF-8");

I should think there would be no need to convert ASCII text into anything else? Is this some auto-correct or spell-checking feature in the browser? Or is this strictly a PHP issue?

Edited 2 time(s). Last edit at 02/11/2013 04:49PM by Robert Hairgrove.

Options: ReplyQuote

Written By
Unwanted character conversions
February 11, 2013 11:07AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.