Skip to Content
1
Mar 13, 2017 at 11:30 PM

SAP UI5, unicode and national (non-ASCII) characters

4047 Views Last edit Mar 14, 2017 at 03:17 PM 2 rev

Dear collective wisdom,

I'm fighting against what looks like a potentially silly issue since too long, so I decided to bother this community and ask for your informed help.

We've started developing a solution on SAP Cloud Platform since just a few months and having a strange issue.

Our solution (written in JavaScript and running natively on the SAP Cloud Platform) calls the Facebook API using web services written and run as .xsjs code; the Facebook API returns specific posts, potentially in non-english languages (German and its ä, ö, ü, ß is very common).

We then reads the returned JSON objects, transform them with .asString() and JSON.parse() them before writing the posts and a few values in HANA tables.

Everything works perfectly with English, it is NOT working with all non-ASCII characters, thou.

When we display the posts in SAP UI5 using GenericTile and sap.m.Text content, we always get "corrupted" non-ASCII characters, i. e. in a form similar to: "Wusstest du, dass der lateinische Name von Rosmarin �Tau des Meeres� bedeutet? Dieser poetische Name kommt von der Herkunftsregion des aromatischen Strauchs, dass vor allem an den Küsten des Mittelmeeres wächst."

Of course our index.html includes:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

We've tried pretty much everything possible, so I'd be really grateful for anybody pointing us in the right direction...

Thank you in advance,

Luca