Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SAP HANA SPS 09 - Charset encoding issue

$
0
0

Hello experts,

 

I have recently upgraded my hana database from SPS08 to SPS09. After the upgrade, the data that contains special characters such as ç, ã, õ are displayed incorrectly. This data is retrieved from the database using XS Services or ODataModel binding.

 

At first I thought I missed the content-type parameter during the service call and response return. But I double-checked my code and it seems fine. There is a simple solution when XS Services is used: instead of using the library $.db to connect to the database, use the new $.hdb.

 

But I could not find a solution for ODataModel binding. I tried to force the request header content-type with the following code:

 

oModel.oHeaders["Content-Type"] = "application/json;charset=UTF-8";

 

I checked in Chrome Developer tool that this information is sent in the request header as expected (Content-Type:application/json;charset=UTF-8),  but  the response header is always (content-type:application/json).


This problem didn't happen in SPS08. Any suggestion to fix this issue?


Regards,


Gustavo


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>