File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes cannot use utf-8 to store utf-8 character, please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "cannot use utf-8 to store utf-8 character, please help" Watch "cannot use utf-8 to store utf-8 character, please help" New topic
Author

cannot use utf-8 to store utf-8 character, please help

sun_guoqiao
Greenhorn

Joined: Jul 17, 2001
Posts: 4
Dear all:
I am using mySQL to store some Chinese character, which is submitted from html form. My problem is:
When I use <meta http-equiv=Content-Type content="text/html; charset=utf-8"> in jsp file, the Chinese character can be saved into database correctly and also can be retrieved and displayed correctly later time.
When I added <%@ page contentType='text/html; charset=utf-8' %> into the jsp file, the Chinese character cannot be saved and displayed correctly.
Can anyone kindly give me some hint why? Thx.
==========================================================

I need to use <%@ page contentType='text/html; charset=utf-8' %> in the jsp file in order to display i18n properties file content.
Thanks for your time!
guoqiao
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

Welcome to the Ranch "sun_guoqiao"!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
JSP Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot use utf-8 to store utf-8 character, please help
 
Similar Threads
The function of sRequest in JSP
Problem while storing Japanese characters in Oracle 9i
Turkish Character Problem in Properties Files
struts with character encoding problem
saving chinese data to text file