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.

Did you build PHP with Oracle XE libraries?

Some versions of Oracle libraries support a restricted set of
character sets to reduce size.  For example, Oracle Instant Client
Basic Lite has only English error messages and Unicode, ASCII, and
Western European character set support.

Oracle XE comes in two bundles, one supporting only the character set
WE8MSWIN1252, the other AL32UTF8.  See

Oracle's general name for UTF8 is AL32UTF8.  A list of character set
names is at:

> Does anyone encounter this weird issue before? The php version I'm
> using is 5.2.1.

PHP 5.2.1 is old now, and there have been many updates. If possible
upgrade PHP.

For all 5.2.x versions (including 5.2.8) I would upgrade at least the
OCI8 extension to version 1.3.  See
Instructions are in


Email:  Tel: +1 650 506 8630
Twitter:    Free PHP Book:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to