We have an existing db (10.2.0.4.0) and forms (11.1.2.1.0) application, that we're trying to extend to support Chinese characters.

We're looking to add some unicode (nvarchar2) columns to existing tables, rather than converting the whole db charset.

I've pasted my environment settings below. What I've found so far in trying to create a local (ie. running the form in Builder with local weblogic running) test form, is that I can insert the chars ok (using plsql developer) and the test form can display them correctly, but cannot write them back to the database. They appear as upside down question marks in any records the form has created.

Env variables:

NLS_LANG = .UTF8

Database:

NLS_CHARACTERSET = WE8MSWIN1252

NLS_NCHAR_CHARACTERSET = AL16UTF16

1) So, can anyone give me any pointers on how to get the form to write the characters back into the database correctly?

2) The chinese chars will only be relevant to a few forms inside the app, are there any settings local to the form that will enable unicode support, rather than setting at OS level. ie, an alter session, or equivalent?

3) Oracle Reprts doesn't appear to have an nchar datatype unlike Forms, is there anyway to get Reports (generating PDFs), to include Chinese, or is it not possible?

thanks in advance, please let me know if you need any more info.

**EDIT**

I now have the chars writing back to the db ok. If you do it via an INSERT statement from inside the form, it doesn't work. It appears the value is sent to the db in the normal charset rather than the national charset, and it's written as a question mark. If you pass the value from the form into a back end stored proc though (which does the insert) it works okay.

I have not worked with Forms for a long time. Are use sure they actually support the NVARCHAR2 data type? My memory tells me that they do not.

I recommend migrating the database to AL32UTF8. You can support NVARCHAR2 in Forms using workarounds with stored procedures to move data as you described (you should be able to do this while reading as well.) but NVARCHAR2 data type is discouraged as it is not necessarily supported by all database features. For example, you cannot built an Oracle Text index on an NVARCHAR2 column. I am also not surprised that Reports cannot support NVARCHAR2.

Out of curiosity, I have installed Forms 11.1.2.1 and created a form on the standard demo table OE.PRODUCT_DESCRIPTIONS, which has NVARCHAR2 columns. The form seems to work fine with some Cyrillic characters that I tested. My database character set is EE8MSWIN1250, so it does not support Cyrillic characters. Therefore, the NVARCHAR2 Unicode support seems to work fine here. I just had to set NLS_LANG to .AL32UTF8 in default.env file