My Oracle Support Banner

JSON - Unicode Conversion Issue On Oracle 19c (Doc ID 2771472.1)

Last updated on JUNE 25, 2021

Applies to:

Oracle Database - Enterprise Edition - Version 19.9.0.0.0 and later
Information in this document applies to any platform.

Goal

On : 19.9.0.0.0 version, XML Database

JSON - unicode conversion issue on Oracle 19c

A developer in the Development Team is trying to store and retrieve unicode values using JSON.
Here is his description of the issue he is encountering.

"The summary is that we have an NVARCHAR2 defined at the top, which would be a simple example of how we might store data in the DB (most fields are NVARCHAR2).

When I call JSON_OBJECT_T.put I think it casts the NVARCHAR2 to VARCHAR2 automatically, and even though it might be storing the internal data in JSON_OBJECT_T as AL32UTF8 (maybe), there’s no way to get Unicode data into the object. I’ve tried using \uXXXX manually as well, and it just escapes the \ into a \\, thereby losing meaning of the character.

My question to Oracle would be to ask how to force the Unicode into the object. I don’t necessarily require the stringify method to work provided there’s another way to extract the values later on. It just seems to be not fit for purpose. "

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.