Tatsuo Ishii wrote:
>
> > I have a problem at the time of requete containing accents with
> > PostgreSQL version 6.5.3 :
> >
> > Via psql, the following requete does not function :
> >
> > SELECT id_dico, name
> > FROM dico_fr
> > WHERE name ~* '^bé'
> > ORDER BY name;
> >
> > The tables are coded in UNICODE.
>
> Are you sure that you put the query in UTF-8 encoding?
Yes :
essai=> SHOW CLIENT_ENCODING;
NOTICE: Current client encoding is UNICODE
SHOW VARIABLE
essai=> \l
datname |datdba|encoding|datpath
------------------+------+--------+------------
template1 | 31| 5|template1
essai | 1000| 5|essai
Encoding 5 corresponds has the UNICODE.
Here the sequence of command :
essai=> SELECT * FROM dico_fr WHERE nom ~* '^bé';
essai'>
essai'> '
essai-> ;
id_dico|nom
-------+---
(0 rows)
I am obliged to add a quote and a semicolon to finish the request. :-(
I have the same problem when the requests are sent via PHP, even by
making them precede by:
pg_exec($db_conn, "SET NAMES 'UNICODE'");
Thank you for your assistance.
--
==============================================
| FREDERIC MASSOT |
| http://www.juliana-multimedia.com |
| mailto:frederic@juliana-multimedia.com |
===========================Debian=GNU/Linux===