-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Korean Characters & C++ #45
Comments
Hi, What version of ocilib are you using ? Regards, Vincent |
We are using ocilib 4.2.0 with charset mode ANSI. The c++ Middleware runs on Red Hat Enterprise Linux Server release 6.7. We found out that it works as desired without further adjustments of the middleware if the database is installed with an "AL32UTF8" Charset. (NLS_CHARACTERSET = AL32UTF8) The other database-installation was done with "WE8ISO8859P15", this turned all korean characters to '¿¿¿¿'. Still weird that it worked via a C# service. It seems like ocilib binds the values as varchar, which is set to "WE8ISO8859P15". |
Hi, you can use OCI_BindSetCharsetForm(bind, OCI_CSF_NATIONAL) to indicate you're binding strings using national charset) :) Regards, Vincent. |
Thanks! I'll try that :) |
Hi, Any news ? Regards, Vincent |
Sry that i was quiet for so long. The problem is that i don't have an Database to test it any more. If i get a chance to test OCI_BindSetCharsetForm(bind, OCI_CSF_NATIONAL) against a "WE8ISO8859P15"-database i will. But right now i don't have this possibility in the current project. We are supposed to get a new development-DB where we can play around, but i cannot change the charsets in the database we have right now. |
FYI: We can successfully write Unicode to a database using OCILIB, using ANSI charset mode on Windows. We have this code:
And it also requires the database to have a suitable character set I think. |
Closing it as answers have been provided and no more OP activity |
Hi,
i need to write Korean Characters (example: 구결/口訣) into an Oracle database via a C++ Middleware that is using the OCILIB.
It is already possible to write and save these characters with a C# Service that uses the Oracle-Libs, which means that the Database should be configured correctly.
The C++ Middleware runs on Linux and we set the NLS_LANG to GERMAN_GERMANY.AL32UTF8.
I am able to see the characters in the console/log but if i try to write them into the database via an Object that accepts the values as parameters they turn to '¿¿¿¿'.
The C#-Service uses the same Objects to write the data.
The values are bound as strings (std::string) in the C++ Middleware.
Do i need to adjust anything else than the NLS_LANG to make this work?
For example the Binding?
I could not find anything that matters in the OCILIB C Documentation and there aren't any examples for C++ for cases with special characters.
We tried for days but the characters ultimately end up as '¿¿¿¿' in the database tables if we write them via the C++ Middleware.
Thanks for your help!
The text was updated successfully, but these errors were encountered: