How do I convert HTML form data from ASCII/HTML representation to a true Java Unicode string?

Joe Sam Shirah

Conversion from HTML escaped numeric entities is straightforward, if not particularly fun. One method that shows the basic concept, while not very efficient, would be to use String.startsWith() and String.indexOf() to find the beginning "&#" and ending ";", substring enclosed characters and set the Java ( Unicode ) char to the value of Integer.parseInt( theSubstring ).

To understand why this works, see What is a char?

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact