cancel
Showing results for 
Search instead for 
Did you mean: 

UI5 - special characters in controls

0 Kudos

Hey everyone,

I'm trying to use special characters and umlauts like "€, ä, ü, ö" in strings for UI5 controls (as titles, labels ...), but they are not displayed correctly.

I tried to write them HTML encoded: € ä .... 

I defined the character set in my html file following: "charset=UTF-8"

I tried to use different browsers, with different encoding settings.

... but nothing worked for me.

It would be great if anybody can help me to display them in the right way.

Regards,

Hannes

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

This message was moderated.

Former Member
0 Kudos

Please add this meta header to your index or html page.

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


Regards,

                Pruthvi.

0 Kudos

Hi

The above solution sis not working for me.

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

Still some characters espacially chinese are displayed as questions marks? Can any body help here if you have faced similar issues?

former_member182650
Contributor
0 Kudos

Could you check if using unicode code works? \u<<Code>>

If not you could change the encoding file setting on your IDE.

Kind regards

Former Member
0 Kudos

Thanks for your support! Kai Artur Lucas advice worked for me.

Kind Regards,

Hannes

Former Member
0 Kudos

Hi Hannes,

I had the same problem..

You could use \u00e4- for  ä, \u00fc  for  ü and search similar Unicode for other special characters.

Regards,

Ram

Former Member
0 Kudos

Hello Hannes,

i had the same problem. Here's my solution:

First: In index.html change the content-type in header by entering <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>


<!DOCTYPE HTML>

<html>

    <head>

        <meta http-equiv="X-UA-Compatible" content="IE=edge">

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

        <script src="resources/sap-ui-core.js"

                id="sap-ui-bootstrap"

                data-sap-ui-libs="sap.ui.commons, sap.ui.table, sap.ui.ux3"

                data-sap-ui-theme="sap_goldreflection">

.......

Second: Now you've got to set the encoding of your editor to UTF-8, too

In Eclipse go to Window/Preferences/General/Workspace and change the text file encoding to " Other UTF-8"

Now you are able to write these special characters plain in the text and they should displayed correctly in the browser, too.

Hope that will help.

Best wishes

Kai

former_member182650
Contributor
0 Kudos

Hi Hannes,

try represent them with unicode escape \uXXXX where XXXX is unicode char code:

http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=oct&unicodeinhtml=dec&htmlent=1

kind regards