cancel
Showing results for 
Search instead for 
Did you mean: 

i18n: umlauts and other special characters

frankluzat
Participant
0 Kudos

Hi,

I have i18n property files for several languages which use special characters (German, French, Asian languages, etc.)

These files are saved as UTF8 encoded files. Everything works fine as long as I serve these files from my local Tomcat for testing.

But as soon as I deploy the application to the netweaver server and call it from there, all special characters are crippled.

This document states "Use Unicode escape sequences for special characters." but to be honest, I can't believe that this should be the solution.

Accepted Solutions (1)

Accepted Solutions (1)

frankluzat
Participant
0 Kudos

Meanwhile I found a solution:

Either this one:

Native-to-ASCII Converter

Or a more comfortable way if you're working with eclipse:

https://marketplace.eclipse.org/content/properties-editor

The latter one is an eclipse plugin which let's you edit i18n property files in eclipse displaying the "native" representation of characters while saving to disc in escaped unicode format.

seVladimirs
Active Contributor
0 Kudos

You can also check grunt-native2ascii , it would be make sense to include all i18n files and convert them automatically to ASCII during ui5 build.

Answers (1)

Answers (1)

maartenf
Participant

Hi Frank,

I solved this by converting special characters in the i18n files to ascii. You can try this out using an online converter like native2ascii.

ex. Ê becomes \u00ca

Good luck!

Best regards,

Maarten

frankluzat
Participant
0 Kudos

If this is the only solution I'm quite disappointed.

What if I need to change my translations afterwards?

I would have to convert back to original using this tool, then make my changes and convert again?

The files are stored as UTF8 and delivering through local tomcat webserver works perfectly.

I see the problem on the netweaver server side.

maartenf
Participant
0 Kudos

Hi Frank,

I don't know another solution for now. I know it's devious, but you might keep a copy of the i18n files with another extension with the actual texts. After changing you'll have to convert them (manually or maybe via a script...) In that case you don't have to convert them back and forth, but you'll have your files twice obviously.

If someone knows a better solution for this, I'm also very interested!

Best regards,

Maarten

frankluzat
Participant
0 Kudos

Ok, inspecting the SAP delivered message bundle files it's true that they also convert them like this:

#XTOL: Tooltip for the clear filter button

VIEWSETTINGS_CLEAR_FILTER_TOOLTIP=Alle Filter zur\u00FCcksetzen

So, is there any commandline tool (windows) available which can do the job?

Doing it manually would be tedious.

What about the experts? How do you do it in SAP/Open UI5 Development?

seVladimirs
Active Contributor
0 Kudos

There is a plugin available for Eclipse, which is doing needful - http://sourceforge.net/projects/eclipse-rbe/

frankluzat
Participant
0 Kudos

Nice tool, but I'd rather edit my files as plain text without the escape sequences and have the conversions done by a cmdline tool before committing my changes.

Any suggestions for a windows commandline tool / script?

seVladimirs
Active Contributor
0 Kudos

Maybe this one can help you - Batch files - The TYPE command

AndreasKunz
Advisor
Advisor
0 Kudos

I think inside UI5 we get the files in this format from the translation system, so at least I don't know of a conversion tool.