Re: MySQL UTF-8 vs Extended ASCII

From: Date: Tue, 12 Jun 2007 01:01:23 +0000
Subject: Re: MySQL UTF-8 vs Extended ASCII
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-256662@lists.php.net to get a copy of this message
On Mon, June 11, 2007 7:34 pm, Larry Garfield wrote: > You may find this useful: > http://us.php.net/manual/en/function.mb-convert-encoding.php > > It is frequently reasonably good at guessing the incoming character > set, at > least the one time we used it at work. Try running all pages/strings > through > that first before sending them to the database to convert everything > to > UTF-8. I'll give that a shot, if I have mb installed... > You should also make sure that not only is the MySQL connection set to > UTF-8, > the tables and columns themselves are, too. MySQL lets you vary the > encoding > by table and field, so you should check to make sure that *everything* > is > UTF-8 explicitly. The table is: ENGINE=InnoDB DEFAULT CHARSET=utf8 I'd be ecstatic if the characters were just getting mangled -- The TRUNCATION of the data is what's killing me, and which is "unexpected behaviour" to my mind. > PS: The free copy of php|architect from php|tek had a really good > article on > Unicode. Even if you don't read anything else from that issue, read > that. :-) I am behind on my reading for some odd reason... :-v -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#256662) next »