I am working on removing or replacing the miscellaneous symbols in a string (in Java) that is being used in text area field in a web application.What is happening is when I use this below content that content is being converted into unicode decimal representation values.
The content is : String a = 'Last Search Results Bulletin Board Validations ⛔ 0 ⚡ 1 ⚠ 6 ? 0'
when I save that content in the text area( that is in a web page ) , that symbols are being saved as ⛔,⚡,⚠.
I want to remove the unicode representation values (or) save the content in the proper format so that I can have proper data to save into the Database.
How Do I remove the unicode representation values for symbols ('⛔' or '⚡' or '⚠') from String? Actually I tried to have regular expression to replace those representations like below s.replaceAll("&#[9728 - 9983];", " "). The range [9728 - 9983] represents the miscellaneous symbol unicode decimal values range.But it is not replacing it properly. Which regular expression can I use ? or Which approach can Use to remove the values in a String?
(or)
How Do I convert unicode representation values('⛔' or '⚡' or '⚠') into again same symbols (⛔ ,⚡ ,⚠ ) in the String?