• Post Reply Bookmark Topic Watch Topic
  • New Topic

Charset problem!  RSS feed

 
Cao Weifeng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project,there are codes like the following:

in the serverlet:

String msg="北京"; //The China capital
Order o=new Order();
o.City=msg;

o.Save();

in class:

public Class Order{
...
public String City;
...
public Save(){
System.out.println(City);
}
...
}

The result is like:
愸愸

Please give me some advice,thanks!
 
ABHISHEK PARIKH
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There have been many problems with setting charsets for JSP.
Try UTF8, not UTF-8 for encoding, maybe that will help..
 
Cao Weifeng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.

I decide to do in other way.The deadline of my project is aproaching.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!