Options

Problem when selecting UTF-8 data with PHP

Hi, If I am querying for below on PHP select * from country_code_match where english='Cointreau' giving output as (print_r) Array ( [id] => 19 [english] => Cointreau [chinese] => ) here Chinese characters are not displaying If i am tried same query on db its giving correct output phonedb=> select * from country_code_match where english='Cointreau'; id | english | chinese ----+-----------+--------- 19 | Cointreau | 君度 (1 row) what i have to do now. I have changed required things as utf-8 in php and in vertica DSN drivermanager, locale are changed as utf-8 and in my php program I was placed setlocale(LC_ALL, 'en_US.UTF-8'); when selecting for Chinese characters using below in php select * from country_code_match where chinese='君度' nothing is displaying

Comments

  • Options
    Hi! try to check log (path should be defined in vertica.ini file): LogPath=/tmp $ ls /tmp/vertica_* /tmp/vertica_driver.log /tmp/vertica_odbc_conn_1.log $ cat /tmp/vertica_odbc_conn_1.log | grep -i error Sep 27 21:25:00 ERROR 953644800 Statement::ExecuteCatalogFunction: [Vertica][ODBC] (10510) Invalid cursor state. Sep 27 21:25:00 ERROR 953644800 Statement::ExecuteCatalogFunction: [Vertica][ODBC] (10510) Invalid cursor state. Sep 27 21:25:35 ERROR 953644800 Statement::SQLExecDirectW: [Vertica][Support] (50090) Conversion from string to number failed with value: v_catalog

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file