Skip to Content
0

hana db unicode supplementary characters

May 07 at 01:45 PM

32

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lars Breddemann
May 07 at 10:40 PM
0

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.


Share
10 |10000 characters needed characters left characters exceeded