Re: oci_connect returns warning if provided with the 4th param(charset)
| From: | Chris | Date: | Mon, 22 Dec 2008 21:45:14 +0000 |
| Subject: | Re: oci_connect returns warning if provided with the 4th param(charset) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45828@lists.php.net to get a copy of this message | ||
Tonado wrote:
Hi all, I used the following in my code .... oci_connect('$user','$pass',$connectionString,'UTF8'); .... and got the following warning: Warning: oci_connect() [function.oci-connect]: Invalid character set name: UTF8 I tried many times and found it could only work when I removed 'UTF8' or replaced it with 'US7ASCII'. It didn't work even I used 'WE8ISO8859P1'. But I had to use 'UTF8' in order to support multiple bytes. I had tried setting NLS_LANG to AMERICAN_AMERICA.UTF8 in envvars instead of using the 4th parameter in oci_connect, but it didn't work. Using putenv to set NLS_LANG didn't work either.Try 'AL32UTF8'. The oracle db has to be set up to allow those sort of chars too when you create it, you can't convert it (everything I found says you have to do a dump/recreate the db/import the data). http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm -- Postgresql & php tutorials http://www.designmagick.com/