JSP BasicsBeginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
In order to handle Unicode characters correctly in a web-based application, we need to look into these three areas:
First, data source should be able to support Unicode either in file format, database or text entry field.
At the browser end, we need to set character encoding and install a font that can display those Unicode characters. Typically, MS Arial font from Microsoft is a possible choice or any other MS Unicode fonts.
This is where JSP should produce unicode compliant pages. I think our problem happens right here. What we have to do is modifying charset when writing a jsp page.
Currently, I think we have two possible solutions for this problem:
1) Specifying contentType and character set in JSP page directive:
In JSP page directive, we’ll specify contentType with character set we are using in the page. Remember, we have to specify it on the page where Unicode characters exist.
Face same problem, can u share the code to insert the vietnamese character after a post(e.g. username password). As some character(#7853; #259; #7897; #7883;) after insert to oracle 9i it become a '?'. Need expert help urgnetly. Thanks.