GithubHelp home page GithubHelp logo

Korean Characters & C++ about ocilib HOT 8 CLOSED

vrogier avatar vrogier commented on July 30, 2024
Korean Characters & C++

from ocilib.

Comments (8)

vrogier avatar vrogier commented on July 30, 2024

Hi,

What version of ocilib are you using ?
What ocilib charset mode (ansi/widechar) ?
What platform ?

Regards,

Vincent

from ocilib.

Tyrannmisu avatar Tyrannmisu commented on July 30, 2024

We are using ocilib 4.2.0 with charset mode ANSI.

The c++ Middleware runs on Red Hat Enterprise Linux Server release 6.7.
The Database is: Oracle Database 12c Enterprise Edition 12.1.0.2.0 64 bit

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.
My guess: The C# -Service wrote the strings as nvarchar, which is set to "AL16UTF16" in the database.

It seems like ocilib binds the values as varchar, which is set to "WE8ISO8859P15".
But that's really only me guessing.

from ocilib.

vrogier avatar vrogier commented on July 30, 2024

Hi,

you can use OCI_BindSetCharsetForm(bind, OCI_CSF_NATIONAL) to indicate you're binding strings using national charset) :)

Regards,

Vincent.

from ocilib.

Tyrannmisu avatar Tyrannmisu commented on July 30, 2024

Thanks!

I'll try that :)

from ocilib.

vrogier avatar vrogier commented on July 30, 2024

Hi,

Any news ?

Regards,

Vincent

from ocilib.

Tyrannmisu avatar Tyrannmisu commented on July 30, 2024

Sry that i was quiet for so long.

The problem is that i don't have an Database to test it any more.
The Only one that i can test against was re-installed with "AL32UTF8".

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.

from ocilib.

Ben136KBC avatar Ben136KBC commented on July 30, 2024

FYI: We can successfully write Unicode to a database using OCILIB, using ANSI charset mode on Windows. We have this code:

     _putenv_s( "NLS_LANG", "American_America.UTF8");
     boolean ret = OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);
     _putenv_s( "NLS_LANG", "");

And it also requires the database to have a suitable character set I think.
Any strings you transfer have to be UTF8 encoded first!

from ocilib.

vrogier avatar vrogier commented on July 30, 2024

Closing it as answers have been provided and no more OP activity

from ocilib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.