[patch_done] Oracle CharacterSet's

Forum related to Oracle Server

Moderators: gto, EgonHugeist, mdaems

Post Reply
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

[patch_done] Oracle CharacterSet's

Post by EgonHugeist »

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
Last edited by EgonHugeist on 08.07.2012, 16:47, edited 1 time in total.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
ludob
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 04.07.2012, 09:35

Post by ludob »

OCINlsNumericInfoGet( dvoid *hndl, OCIError *errhp, sb4 *val, ub2 item) is what you are looking for with item=OCI_NLS_CHARSET_MAXBYTESZ. Bytes per char is returned in val.

const OCI_NLS_CHARSET_MAXBYTESZ = 91;

http://docs.oracle.com/cd/B10500_01/ser ... .htm#14288

Ludo
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

ludob,

Yes! This is exacly what i'm looking for, Ludo. Thank you. Patch comes today.

Michael

Patch done: Rev. 1466 Now we do support all MBCS's on \testing-egonhugeist and UTF8 on \testing
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply