cancel
Showing results for 
Search instead for 
Did you mean: 

hana db unicode supplementary characters

Former Member
0 Kudos

In the last weeks I've been busy with creating support for SAP HANA db to function as a backend for our apps. A (small) part of our test suite for backends is dedicated to unicode support. Part of this test does the following

- Create character data types of length n. One of 100, and one of the reported maximum size a VARCHAR field can support (as this varies widely per data source)

- Insert and retrieve ASCII character String of with length equal to the size of the field

- Insert and retrieve Unicode characters that reside in the BMP(Basic Multilingual Plane) with length equal to the size of the field

- Insert and retrieve Unicode characters that reside in the Supplementary Plane with length equal to the size of the field

This last test fails on SAP HANA db SPS 2.0, and upon inspection we found we could store Supplementary characters in the field, but only equal to half the length of the field i.e. a string of length n/2.

Is this a known limitation of SAP HANA dbs Unicode support, if so is this documented?

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

VARCHAR stores 7-bit ASCII characters - not UNICODE.

To store UNICODE characters, use NVARCHAR data types.

Checking the reference documentation at "Character String Data Types" would have told you that.


Balu483
Participant
0 Kudos

hi ,

according to VARCHAR datatype stores unicodes VARCHAR can also able to store UNICODE Data.

but can't understand clearly diff between VARCHAR and NVARCHAR.

lbreddemann
Active Contributor
0 Kudos

Please open a new question and tell us what you don't understand.