Is there a way to store the Unicode text in an Oracle database configured as "US7ASCII"

We recently ran into an issue where a trademark symbol is copied from one Oracle database to another, but did it have it like a "?"

We were tracking an issue with configuring the target database with the "US7ASCII" character set. Unfortunately, rebuilding the database to solve this problem is not something we can do at this time.

Is there a way to define a specific column to use a character set other than the character set configured on the server?

+2


a source to share


2 answers


you can use NVARCHAR2 column instead of VARCHAR2 column. Look in the view NLS_DATABASE_PARAMETERS

to determine the NVARCHAR2 character set (it will always support unicode).



+5


a source


You can use UTF-7 encoding to store arbitrary 7-bit encoded Unicode strings. UTF-7 encoding of Unicode text is perfectly legal ASCII text.

Of course, this will take extra care wherever you want to use values, because they are not read as they are (and UTF-7 is rarely used enough that you probably don't support it everywhere).



Alternatively, you can use a more common encoding such as BASE64, but this has the disadvantage that even near-ASCII text is completely unreadable in that encoding. This means that you don't get at least something human readable when some part does not handle the encoding correctly.

0


a source







All Articles