Re: Oracle 10g / PHP / utf-8
Date: Thu, 20 Nov 2008 07:28:25 -0800 (PST)
Hi, thanks for the replies.
@Sybrand: BEFORE POSTING yesterday, I searched the net and read quite
On Linux/Apache/PHP5/Oracle Database 10g Express Edition Release 10.2.0.1.0 I checked the script /usr/lib/oracle/xe/app/oracle/product/ 10.2.0/server/config/scripts/sqlplus.sh, where the environment var NLS_LANG is set to AMERICAN.UTF8. So far so good. It means that the client was properly configured. Since these settings did not have the desired effect, I decided to post here. It seems I should have provided this info to avoid some flames. Sorry ;)
@Laurenz: From PHP I connect using oci_connect(["Username"],
["Password"],["Server"],"AL32UTF8"); The last par is the charset. To make sure we are OK in the PHP client, I set the environment var once more: putenv("NLS_LANG=_.UTF8");
Today I have done lots of testing again. Surprisingly we had a good situation, without problems with UTF8. After recreation of the database with sqlplus in a number of environments (production, test, development), data became corrupted. Today the UTF8 problem disappeared miraculously. No idea why. And exactly that makes me somewhat concerned, since these type of problems tend to pop up again exactly when it is really inconvenient.
So please, I'm just an application developer, not a DBA. Could anyone hint me towards a clear understanding of this problem?
Nico Received on Thu Nov 20 2008 - 09:28:25 CST