Want to replace special characters with equivalent UTF-8 symbols

benfox80

New Member
As part of my application I have written a custom method to extract data from the DB and return it as a string. My string has special characters like the pound sign, which when extracted looks like this:\[quote\] "MyMobile Blue £54.99 [12 month term]"\[/quote\]I want the £ to be replaced with actual pound symbol. Below is my method:\[code\]public String getOfferName(String offerId) { log(Level.DEBUG, "Entered getSupOfferName"); OfferClient client = (OfferClient) ApplicationContext .get(OfferClient.class); OfferObject offerElement = getOfferElement(client, offerId); if (offerElement == null) { return ""; } else { return offerElement.getDisplayValue(); }}\[/code\]Can some one help on this?
 
Back
Top