2007/03/08

PHP 以 UTF-8寫入 ORACLE 變亂碼(2007-3-8)

When you encountered Error "ORA-12705: Cannot access NLS data files or invalid environment specified" or Your write UTF-8 into Oracle table and they turned into unrecognized codes..... Try this;
  1. Check environment NLS_LANG variable using phpinfo() to see what setting is on Web server
  2. Check Check environment NLS_LANG variable using set grep LANG to see what setting is on Oracle
  3. NLS_LANG variables on both server must be the same to avoid 亂碼

    In my example: NLS_LANG=American_America.UTF8