RE: PHP 6: Mysql with iso-8859-1 chars outputting utf-8: "Could not convert binary string to Unicode string"

"Andi Gutmans" <[email protected]>
Newsgroups gmane.comp.php.internationalization
Message-ID <[email protected]>
Georg,

Do you guys support UTF-16? It'd be nice if we could just feed MySQL UTF-16 and you'd do the right thing. It'd save us from having to convert to UTF-8. Sure you'd have to most probably do it for us but it's easier when the DB driver does the work. 

> -----Original Message-----
> From: Georg Richter [mailto:[email protected]] 
> Sent: Wednesday, May 02, 2007 9:04 PM
> To: Andrei Zmievski
> Cc: Rangel Reale; PHP I18N
> Subject: Re: [PHP-I18N] PHP 6: Mysql with iso-8859-1 chars 
> outputting utf-8: "Could not convert binary string to Unicode string"
> 
> Andrei Zmievski wrote:
> > Georg,
> > 
> > Can you look into this?
> > 
> > -Andrei
> > 
> 
> Hi!,
> 
> >>
> >>   mysql_query('set names latin1', $this->mysql_link);
> 
> That doesn't work when unicode.semantics is on. When running 
> with unicode.semantics=on mysql extension expects data from 
> server in utf8.
> 
> 
> >>
> >>   mysql_query('set names utf8', $this->mysql_link);
> 
> You don't need to do that, after calling mysql_connect the 
> utf8 character set will be set by default.
> 
> >>
> >> it works, but I would like to keep compatibility with PHP 
> 5, and for 
> >> my application it requires set names to be latin1. Also, 
> my databases 
> >> are not created with the "utf8" option.
> 
> MySQL Server takes care of the conversion, so if your tables 
> are in latin1, and default character set is utf8 data will be 
> converted on server side.
> 
> /Georg
> --
> Georg Richter, Development Manager - Connectors & Client 
> Connectivity MySQL GmbH, Radlkoferstr. 2, D-81373 München, 
> www.mysql.com
> Geschäftsführer: Hans von Bell, Kaj Arnö - HRB München 162140
> 
> --
> PHP Unicode & I18N Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.