cancel
Showing results for 
Search instead for 
Did you mean: 

umlaut characters getting distorted while displaying in Web dynpro java

Former Member
0 Kudos

Hi All,

I have a scenario where I am reading some string values from a properties file placed in java DC.

The values read from properties file are to be displayed in Web Dynpro application.

The string values contain some umlaut characters eg (ü,ä).

While displaying in web Dynpro application the umlaut characters are getting distorted.

Any pointers for the same?

Regards

Radhika Kuthiala

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Radhika,

You can use concept of java encoding.

Solution1> you can convert the property file in the encoded format, in the DC having the pr0perty file.

use this command in the command line:-->native2ascii -encoding utf8 file.txt file2.txt

Sol2> You can set the encoding details in the NWDS, pls refer the below link:-

http://vietunicode.sourceforge.net/howto/java/encoding.html

Sol3> you can read the file and save in the Strign format and use java package import java.nio.charset.;* and encode the string.

Hope thismay help you.

Deepak!!!

Former Member
0 Kudos

Hi Deepak,

I have already made the settings in NWDS for UTF8.

Can you please elaborate on solution 1 and 3:

Solution1> you can convert the property file in the encoded format, in the DC having the pr0perty file.

use this command in the command line:-->native2ascii -encoding utf8 file.txt file2.txt

-


Are we renaming hte files after changing the format?

Solution3>* you can read the file and save in the Strign format and use java package import java.nio.charset.;* and encode the string.

byte[] utf8 = val1.getBytes("UTF-8");

String vala = new String(utf8, "UTF-8");

I have already tried this ways too.Is this what Solution 3 implements?

Regards

Radhika Kuthiala

Former Member
0 Kudos

Hi Radhika,

Solution1> you can convert the property file in the encoded format, in the DC having the pr0perty file.

use this command in the command line:-->native2ascii -encoding utf8 file.txt file2.txt

-


Are we renaming hte files after changing the format?

In one of my previous project we have property file with the french character so we got error, to avoid this we have manually transtaled the file and utilized in the application and used the command in dos promt:-

native2ascii -encoding utf8 source.txt destination.txt ,

here if you want to replace the existing file u have to give same name source and destination file. But we have created 2 seprate file. after translation you will something like Fre/uooch king of output.

Solution3> you can read the file and save in the Strign format and use java package import java.nio.charset.; and encode the string. ---

Pls refer the below link:-

http://mindprod.com/jgloss/encoding.html

Hope this may help you.

Deepak!!!

Former Member
0 Kudos

One easy solution i have found is to change NWDS encoding from UTF-8 to CP1252. When you do that, your french characters will become distorted in NWDS. Re-type the french characters from another source or copy paste from somewhere else so that they are not distorted anymore (like Français). Deploy the app and browser will show the french characters correctly.