Programming Guide : Working with Images and Text Strings : How You Can Work with Text Strings : How You Can Determine If a Database is Unicode-enabled
 
Share this page          
How You Can Determine If a Database is Unicode-enabled
For Ingres, a database is Unicode-enabled when you use either the -i or -n option when you create the database. You can determine whether a database is Unicode-enabled by issuing the following query:
SELECT   cap_value
  FROM   iidbcapabilities
  WHERE   cap_capability = 'NATIONAL_CHARACTER_SET'
If the value of cap_value is 'N', then the database is not Unicode-enabled. If the value of cap_value is 'Y', then the database is Unicode-enabled.
If the database is Unicode-enabled, the system default catalog used to store StringObjects, ii_stored_strings, cannot be used to save and retrieve data. The user always must supply a predefined table as a parameter on the InsertIntoDB method of the StringObject.
IMPORTANT!  For Unicode-enabled databases, we strongly recommend using Normalization Form C (NFC) normalization format databases (-i option with the createdb command) because OpenROAD uses NFC internally when coercing between Unicode and non-Unicode data.
You can determine the normalization form in the database by issuing a call to dbmsinfo():
SELECT dbmsinfo('unicode_normalization')
The select statement will return blank if the database does not support Unicode or if the database does not perform normalization. It will return the value 'NFC' if the database supports the NFC normalization form, and returns the value 'NFD' if the database supports the NFD normalization form.
For more information on dbmsinfo(), see the Ingres SQL Reference Guide.