It's not a secret anymore!*
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: 60980
    
  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