Talk:Installing Oracle for PHP
From MoodleDocs
Encoding Woes
Using the Zend provided packaged install of Apache+PHP, I found it was needed to hack a bit to get the environment with the correct $NLS_LANG. (This can be done by editing the provided {ZENDHOME}/apache2/bin/apachectl, or in an rc script - ymmv if not using the Zend packaged PHP5+Apache2).
Best to set NLS_LANG=$($ORACLE_HOME/bin/nls_lang.sh), so your web server just takes it from whatever Oracle decides it should be. In my locale the default happens to be "AMERICAN_AMERICA.AL32UTF8".