[patch_done] Oracle CharacterSet's
Posted: 09.06.2012, 13:31
Hi to all,
actually i'm reworking the oracle support of Zeos7.
While doing this job i was running into one issue.
Short description:
I've made a list of all available charactersets which i've found in the documentations of oracle. Now i decided to set the nls_lan and nls_nchar charactersets to the same id with the EnvNlsCreate(FHandle, OCI_DEFAULT, nil, nil, nil, nil, 0, nil,
OCI_CLIENT_CHARSET_ID, OCI_CLIENT_CHARSET_ID);
That works very well. Now i can use an UTF8 or System-compatible characterset for all char fields. The server does now all char convertations like on our free engines.
Now to my issue:
If i want to read a CLOB i have to know how many bytes one char could have or i get the error 99:OCI_NEED_DATA from the server if i try to read with readbyte=characters. Max 3 bytes per utf8 char for example. But on the documentions i've found a very long list of multibyte charactersets like JA16SJISTILDE. In my mind we do not support such charactersets actually and runnning allways into the same issue.
How can i read out such meta-informations or where can i find the bytes/char on the documentations?
a list of the characterset is available here:
http://docs.oracle.com/cd/B28359_01/ser ... m#NLSPG014
but i didn't found one article which helps me to solve this issue...
Best regards,
Michael
actually i'm reworking the oracle support of Zeos7.
While doing this job i was running into one issue.
Short description:
I've made a list of all available charactersets which i've found in the documentations of oracle. Now i decided to set the nls_lan and nls_nchar charactersets to the same id with the EnvNlsCreate(FHandle, OCI_DEFAULT, nil, nil, nil, nil, 0, nil,
OCI_CLIENT_CHARSET_ID, OCI_CLIENT_CHARSET_ID);
That works very well. Now i can use an UTF8 or System-compatible characterset for all char fields. The server does now all char convertations like on our free engines.
Now to my issue:
If i want to read a CLOB i have to know how many bytes one char could have or i get the error 99:OCI_NEED_DATA from the server if i try to read with readbyte=characters. Max 3 bytes per utf8 char for example. But on the documentions i've found a very long list of multibyte charactersets like JA16SJISTILDE. In my mind we do not support such charactersets actually and runnning allways into the same issue.
How can i read out such meta-informations or where can i find the bytes/char on the documentations?
a list of the characterset is available here:
http://docs.oracle.com/cd/B28359_01/ser ... m#NLSPG014
but i didn't found one article which helps me to solve this issue...
Best regards,
Michael