User's Manual

String Manipulation
8-2 Oracle Database Express Edition 2 Day Plus PHP Developer Guide Beta Draft
The language and territory settings control Oracle behaviors such as the Oracle date
format, error message language and the rules used for sort order. The character set
AL32UTF8 is Oracle's name for UTF-8.
When Zend Core for Oracle is installed on Apache, NLS_LANG can be set in
/etc/profile:
export NLS_LANG GERMAN_GERMANY.AL32UTF8
If Zend Core for Oracle is installed on Oracle HTTP Server, NLS_LANG needs to be set
as an environment variable in $ORACLE_HOME/opmn/conf/opmn.xml:
<ias-component id="HTTP_Server">
<process-type id="HTTP_Server" module-id="OHS">
<environment>
<variable id="PERL5LIB"
value="D:\oracle\1012J2EE\Apache\Apache\mod_perl\site\5.6.1\lib"/>
<variable id="PHPRC" value="D:\oracle\1012J2EE\Apache\Apache\conf"/>
<variable id="NLS_LANG" value="german_germany.al32utf8"/>
</environment>
<module-data>
<category id="start-parameters">
<data id="start-mode" value="ssl-disabled"/>
</category>
</module-data>
<process-set id="HTTP_Server" numprocs="1"/>
</process-type>
</ias-component>
The web listener will need to be restarted to pick up the change.
String Manipulation
PHP was designed to work with the ISO-8859-1 character set. To handle other
character sets, specifically multi-byte character sets, a set of "Multi-Byte String
Functions" is available. To enable these functions open the Zend Core for Oracle
console and go to the Configuration tab.
Navigate to the Extensions sub-tab and expand the Zend Core Extensions tree control.
Your application code should use functions such as mb_strlen() to calculate the
number of characters in strings. This may return different value than strlen(),
which will return the number of bytes in a string.
Once the mbstring extension has been enabled and the web server restarted, several
configuration options become available. You can change the behavior of the standard
PHP string functions by setting mbstring.func_overload to one of the "Overload"
settings.
The PHP mbstring reference manual http://www.php.net/mbstring contains
more information.
See also: Oracle Database Express Edition installation guides for
information on the NLS_LANG environment variable.