Access NVARCHAR2 Tables
448765Oct 29 2009 — edited May 21 2010Hi,
I have a question regarding accessing the NVARCHAR2 columns in Oracle. Searching the threads did not help me yet.
Maybe somebody sees where I am mistaken or already solved my problem.
We have a database with NLS_LANG : WE8ISO8859P1, NLS_NCHAR_CHARACTERSET : AL16UTF16. We have some tables containting unicode data(nvarchar2).
We use PHP5, PEAR::MDB2 to access the database, charset of the given DSN is : WE8ISO8859P1, using the oci Interface.
When I access the tables some characters are not displayed well (quiestionmarks) in the browser.
I suggest that the unicode date is returned in WE8.. charset.
I played a little bit with header and document settings (of the returned page). But anyway in my opinion the returned document to the
user has to be coded in UTF-8, ISO can not be a solution because its a subset.
Is it anyway possible to access the unicode nvarchar2 tables of the database created with non unicode standard language setting ??
Please start no discussion about the configuration. The settings are fixed.
Hint :
My current workaround is to return the data as XML which works fine (for reading), but I hope there is a nicer, more technical solution possible.
Edit :
I connected now with my client to the original database : NLS_LANG : UTF8, NLS_NCHAR_CHARACTERSET : AL16UTF16.
I've set the dns-charset to AL32UTF8 and all the signs have been show perfect.
So I assume the NLS_LANG and the "language" the connection talks is the problem. Any hints for me ??
Is there a possibility to set OCI_ATTR_CHARSET_FORM to SQLCS_NCHAR in php ??
Edited by: Carsten on Nov 3, 2009 5:33 PM