cancel
Showing results for 
Search instead for 
Did you mean: 

Special characters replacement

Former Member
0 Kudos

Hi All,

I am facing a problem while replacing special characters in java mapping.

requirement is: we ned to replace the characters as given below:

à       a      À  A

â       a        A

ç       c      Ç  C

é       e      É  E

è       e      È  E

ê       e      Ê  E

ë       e      Ë  E

î         i       Π I

ï         i       Ï  I

ô       o      Ô  O

ù       u      Ù  U

û       u      Û  U

the problem is, when i execute the java map , it changes the encoding automatically to UTF 8 which convert these characters to some weired combionations for exp:

é is represented as é, in UTF 8

And i had to search for these characters i.e to replace Ê :  a= a.replaceAll("Ê","E");

// é,è,ë,ê = é,è,ë,ê

// í,ï = í,ï

// ó,ô = ó,ô

// ù,û = ù,û

//   Ä = Ä

//   Ö = Ö

// Ü = Ãœ

// ê = ê

is there any simple way i can maintain the ISO encoding in the java map or replace these special characters with normal english characters?

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

You can use the symbolic codes for each character, e.g. à is symbolized by \u00F0. You can find the complete list of unicode symbols for different characters e.g. here:

List of Unicode characters - Wikipedia, the free encyclopedia

Some more info on how to replace unicode-based characters with Java code e.g. here:

Replacing Unicode character codes with characters in String in Java - Stack Overflow

Regards,

Greg

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Check this. It may help

http://scn.sap.com/docs/DOC-46151