[Phpmyadmin-devel] Matching accented characters in PHP ?

Hi list,
From a bug report that was just made about the parser: SELECT sum(dureé) FROM files;
My parser fails on the é in the query, as I hadn't treated it as a valid character before now, but re-reading the docs on MySQL column names, as long as the name is valid in your filesystem, it will be accepted by MySQL. This means I need a way to match all accented characers to check for them in an SQL identifier. I put together a simple function that I thought should work, but it was for the windows character range, not iso-8559-1. Could somebody fix my PMA_STR_isAccented in libraries/string.lib.php3? I am also wondering if the character set that MySQL is using needs to be known to use the correct characters for matching accented stuff ? Could our character set people enlighten me on this please? -- Robin Hugh Johnson E-Mail : robbat2@orbis-terrarum.net Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 ICQ# : 30269588 or 41961639

Robin Johnson wrote:
Hi list,
From a bug report that was just made about the parser: SELECT sum(dureé) FROM files;
My parser fails on the é in the query, as I hadn't treated it as a valid character before now, but re-reading the docs on MySQL column names, as long as the name is valid in your filesystem, it will be accepted by MySQL.
As stated in http://www.mysql.com/doc/en/Legal_names.html since MySQL 3.23.6, db names are restricted to characters allowed as a directory name, table names restricted to characters allowed as a file name. But column names are not restricted. Before 3.23.6, this is slightly different. Can't the parser just accept anything as a column name (if MySQL >= 3.23.6)?
This means I need a way to match all accented characers to check for them in an SQL identifier.
I put together a simple function that I thought should work, but it was for the windows character range, not iso-8559-1.
Could somebody fix my PMA_STR_isAccented in libraries/string.lib.php3? I am also wondering if the character set that MySQL is using needs to be known to use the correct characters for matching accented stuff ?
Could our character set people enlighten me on this please?
participants (2)
-
Marc Delisle
-
Robin Johnson