cancel
Showing results for 
Search instead for 
Did you mean: 

Strange encoding after production build of SAPUI5 app

julian-s
Participant

Hello,

We are currently facing a problem with the WebIDE deployment process to our own SAPUI5 ABAP Repository.

We have a prepared an i18n.properties file, where all the German strings are saved.

If we start the application on the WebIDE itself, then the encoding of the strings works perfectly as expected. But when we are now trying to build and deploy the app on the ABAP repository, it will fail with the encoding. During the build process on the WebIDE, it convert the the i18n properties file in another encoding. We see the file here from the dist folder.

As a result, we see a wrong encoded application:

Now the question is, what can we do to set the correct charset and get the expected result.

Thanks in advance.

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

Could you share package.json and ui5.yaml with us? Seems like a common issue UI5 devs encounter nowadays. One of the solutions would be to tell the tooling to read the *.properties files with UTF-8 when converting. See https://stackoverflow.com/a/58835799/5846045

View Entire Topic
AndreasKunz
Advisor
Advisor
0 Kudos

Hi, I can't fully answer, but as the converted Unicode character code \u00c3 is already wrong (the "A" with tilde), the problem is definitely during the conversion. Seems like this conversion assumes the wrong charset for the input file. Or the input file HAS a wrong encoding. What is the encoding? You can change it with tools like Notepad++, maybe switching to or from UTF-8 helps.

julian-s
Participant
0 Kudos

Hi Andreas,

thank you for your answer. I have exported the file into Notepad++, but it shows me that it is already encoded in UTF-8. Also the characters (especially the umlauts) are showing up correctly, as you can see in the picture.

I have already tried to convert the document to UTF-8-BOM, but ending in the build process with the same result.