Jsp disorderly codes question,or search data question. (100分)

  • 主题发起人 pengxuan
  • 开始时间
P

pengxuan

Unregistered / Unconfirmed
GUEST, unregistred user!
In a JSP file with a Chinese parameter,
example:findstr.jsp?para="价值",
If I want to search and show resultsets
in the database one of whose fields's value
contains "价值",how I can avoid showing
disorderly codes?
Now by any means the value of getParameter("para")
is disorder codes or resultsets can't be found.
Both of them can't be satisfied at one time.
Thank you.
 
hi,
try this,
byte[] para1 = getParameter("para").getBytes("GBK");
string s = new String(para1,"8859_1");
larry

 
接受答案了.
 

Similar threads

A
回复
0
查看
863
Andreas Hausladen
A
A
回复
0
查看
738
Andreas Hausladen
A
I
回复
0
查看
747
import
I
I
回复
0
查看
644
import
I
顶部