Made changes with OutParam::OCCICLOB bacause of problems with output cirillic chars #173

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@piraman

piraman commented Apr 18, 2014

I found a problem with output data with cyrillic chars from oracle. When output was large size (over ~2000 chars) i got unrecognized chars in clob. The settings are: NLS_LANG=.UTF8 (also tried AMERICAN_AMERICA.UTF8, AMERICAN_AMERICA.AL32UTF8.). After i made changes in connection.cpp it started work. :)

@@ -795,12 +795,13 @@ void Connection::handleResult(ExecuteBaton* baton, Handle<Value> (&argv)[2]) {
output->clobVal.open(oracle::occi::OCCI_LOB_READONLY);
oracle::occi::Stream* instream = output->clobVal.getStream(1,0);
size_t chunkSize = output->clobVal.getChunkSize();
- char *buffer = new char[chunkSize];
+ char *buffer = new char[chunkSize + 1];

This comment has been minimized.

Show comment Hide comment
@piraman

piraman Apr 18, 2014

Not enough size

@piraman

piraman Apr 18, 2014

Not enough size

@realityfilter

This comment has been minimized.

Show comment Hide comment
@realityfilter

realityfilter Jul 10, 2014

I think this problem might have something todo with bugfix of pull request #198.

Currently reading a clob is broken because the whole buffer gets appended to the result string regardless of the read count.

I think this problem might have something todo with bugfix of pull request #198.

Currently reading a clob is broken because the whole buffer gets appended to the result string regardless of the read count.

@raztus

This comment has been minimized.

Show comment Hide comment
@raztus

raztus Sep 17, 2014

Collaborator

@piraman I've just merged #198. Would you please try it from master and see if it fixes your issue?

Collaborator

raztus commented Sep 17, 2014

@piraman I've just merged #198. Would you please try it from master and see if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment