Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OciAttrGet - Problem getting column names with non-ASCII symbols

Alex PetrovApr 5 2017 — edited Apr 5 2017

Hello. In some cases we create tables where column names contain non-ASCII symbols, for example:

CREATE TABLE f56ĆŻŻ (VŻ int, VĆ nchar(10))

But when I try to retrieve column names using OciAttrGet, I get "ASCII version" of the column name: VZ and VC.

OciAttGet call for any column is:

OciAttrGet(...,OCI_DTYPE_PARAM, (dvoid**) &col_name, (ub4 *) &nNameSize, OCI_ATTR_NAME, errh)

and nNameSize correctly(?) returns 4 (2 symbols in column name X 2 bytes per symbol).

But col_name has value "VZ" (wchar_t*), but not VŻ.

The environment is initialized using the following call:

OciEnvNlsCreate(. . ., OCI_UTF16ID, OCI_UTF16ID)

My impression - since I use UTF16ID value at initialization, all metadata should be in UCS2 format.

So how to get correct column names?  Or I miss some  options controlling encoding in OciAttrGet?

Thanks,

Alex

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2017
Added on Apr 5 2017
0 comments
411 views