php-i18n Digest 4 May 2007 20:22:38 -0000 Issue 356

Topics (messages 1064 through 1068):

Re: PHP 6: Mysql with iso-8859-1 chars outputting utf-8: "Could not convert 
binary string to Unicode string"
        1064 by: Georg Richter
        1065 by: Andi Gutmans
        1066 by: Derick Rethans
        1067 by: Andi Gutmans

Drawing all characters using GD
        1068 by: Seth Price

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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
> 
> 

--- End Message ---
--- Begin Message ---
On Wed, 2 May 2007, Andi Gutmans wrote:

> 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.

AFAIK MySQL only supports USC2, and not UTF-16. That shouldn't cause any 
problems though as this means MySQL would not support chars out of the 
BMP (which it wouldn't with UTF8 either).

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

--- End Message ---
--- Begin Message ---
So can we fix the MySQL extension to just feed the UTF-16 as USC2
instead of converting to UTF-8? 

> -----Original Message-----
> From: Derick Rethans [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 03, 2007 12:38 AM
> To: Andi Gutmans
> Cc: Georg Richter; Andrei Zmievski; 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"
> 
> On Wed, 2 May 2007, Andi Gutmans wrote:
> 
> > 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.
> 
> AFAIK MySQL only supports USC2, and not UTF-16. That 
> shouldn't cause any problems though as this means MySQL would 
> not support chars out of the BMP (which it wouldn't with UTF8 either).
> 
> regards,
> Derick
> 
> --
> Derick Rethans
> http://derickrethans.nl | http://ez.no | http://xdebug.org
> 

--- End Message ---
--- Begin Message --- I have enough fonts installed on my machine to draw most of the world's UTF-8 characters. But they aren't all in one font file. How can I use the resources I have to reliably draw any character using imagetttext()?

For example: Most of the text I want to draw is regular ASCII, many words contain Extended ASCII. Then some of it is Korean, Chinese, Japanese or Arabic. I don't know when I'll come across what charset. I want to draw them all. Is this even possible?

If I had a list of font files, could I test each to work with a given string, until I find one which works?
~Seth

--- End Message ---

Reply via email to