MySQL Forums
Forum List  »  PHP

Re: Unwanted character conversions
Posted by: Rick James
Date: February 11, 2013 11:48PM

Thanks, Peter.

I have never seen oe turned into "ö" by anything in MySQL. Or ss to "ß". (Some collations will equate those strings.) I would suspect the OS. What client are you using? Are you typing these characters? Pasting them?

Have you verified that the bytes it the table(s) are in the encoding declared for their columns? (See the SELECT HEX() technique in my doc.)

As for 5.0 vs 5.5, etc -- I have seen no relevant changes between 4.1 and 5.5, except for the German sharp-s.

> The byte sequence "oe" is exactly the same in UTF8 as in ASCII as in ISO-8859-1.
Is it this?...
mysql> SELECT HEX('oe');
+-----------+
| HEX('oe') |
+-----------+
| 6F65      |
+-----------+
SELECT HEX("ö") will be 2 hex characters for latin1 (F6); 4 for utf8 (C3B6).
http://www.danshort.com/ASCIImap/indexhex.htm
http://www.fileformat.info/info/unicode/char/00f6/index.htm

> Since our server gives you HTML pages in ISO-8859-1 by default

Use the <meta...> thingie at the top of pages you generate.

> it is going behind my back and converting "oe" to "ö"

I'm wondering if IE8 or Win-8 is being "too smart". As in, somehow thinking you are German and allowing you the shorthand "oe" for for o-umlaut.

There are sooo many layers of code trying to either "do the right thing" or "help you", that it is hard to debug problems like yours.

Options: ReplyQuote


Subject
Written By
Posted
Re: Unwanted character conversions
February 11, 2013 11:48PM


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.