Hi!
I notice that mysql_set_charset function is not part of 5.3 tree and
it's test is marked as "usage not recommended". Could you explain what
is the reason for that? It's quite unusual to drop functions in later
versions, and if mysql_set_charset() has some problem we should note
that in the manual.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Stanislav Malyshev schrieb:
I notice that mysql_set_charset function is not part of 5.3 tree and
it's test is marked as "usage not recommended". Could you explain what
is the reason for that? It's quite unusual to drop functions in later
versions, and if mysql_set_charset() has some problem we should note
that in the manual.
Hi Stas,
good find!
I think it has happened accidently in 5_3 at Revision 1.213.2.6.2.16.2.2
when patching ext/mysql for mysqlnd some 10 months ago [1] . Its in 5_2
and its in HEAD. Andrey is working on re-introducing it to ext/mysql in
the 5_3 branch.
I don't recall why I added "usage not recommended" to the test. Let me
check with Georg. He had some concerns on the function as far as I remember.
Ulf
Ulf Wendel schrieb:
and its in HEAD. Andrey is working on re-introducing it to ext/mysql in
the 5_3 branch.
There it is http://news.php.net/php.cvs/52063
Ulf
Hi!
There it is http://news.php.net/php.cvs/52063
Thanks!
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Ulf Wendel schrieb:
I don't recall why I added "usage not recommended" to the test. Let me
check with Georg. He had some concerns on the function as far as I
remember.
I checked with Georg. My memories regarding Georg's position are totally
wrong. He once introduced mysql_set_charset to the MySQL Client Library
(AKA "libmysql" - marketing gets confused when I use libmysql, sorry).
He explained to me that using SET NAMES is what is not recommended when
using libmysql because:
- there is no verification if the client knows the charset
- the internal mysql->charset field will not be set properly
I don't know how that "usage not recommended" comment has crept in the
test. Probably my fault...
Ulf
He explained to me that using SET NAMES is what is not recommended when
using libmysql because:
- there is no verification if the client knows the charset
- the internal mysql->charset field will not be set properly
Is this something we should add to the mysql[i]_set_charset() docs?
I've seen bunch of people doing mysql[i]_query("SET NAMES UTF8");...
-Hannes
He explained to me that using SET NAMES is what is not recommended
when
using libmysql because:
- there is no verification if the client knows the charset
- the internal mysql->charset field will not be set properly
Is this something we should add to the mysql[i]_set_charset() docs?
I've seen bunch of people doing mysql[i]_query("SET NAMES UTF8");...
yes .. most people do it for historical reasons, or because they did
not want to clutter their libraries with function_exists()
calls.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org
Hannes Magnusson wrote:
He explained to me that using SET NAMES is what is not recommended when
using libmysql because:
- there is no verification if the client knows the charset
- the internal mysql->charset field will not be set properly
Is this something we should add to the mysql[i]_set_charset() docs?
I've seen bunch of people doing mysql[i]_query("SET NAMES UTF8");...-Hannes
The people doing it usually have to support PHP versions lower than
5.2.3, we use SET NAMES on older versions of PHP.
Scott
On Thu, Aug 7, 2008 at 6:29 PM, Hannes Magnusson
hannes.magnusson@gmail.com wrote:
He explained to me that using SET NAMES is what is not recommended when
using libmysql because:
- there is no verification if the client knows the charset
- the internal mysql->charset field will not be set properly
Is this something we should add to the mysql[i]_set_charset() docs?
I've seen bunch of people doing mysql[i]_query("SET NAMES UTF8");...
Is it possible to add similiar functionality to pdo_mysql?
Probably in the form of custom option.
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/