Forums Register Login

EL's encode

+Pie Number of slices to send: Send
I got a parameter named "name" through post method.But the "name" is a Chinese word in GBK.When I use ${param.name},it prints "???".I already have the <%@ page pageEncoding="GBK"%>.
I can change the encoding through the servlet.But how can I do the same thing with the EL in JSP?
How can I make the jsp print the correct word in Chinese?
Thanks!
+Pie Number of slices to send: Send
There is a useful article on this problem: here

I think you also need to set the content type and charset for your page.
Page Encoding is the encoding your JSP will be downloaded as (ie what it uses for reading the JSP).
The content type/charset is for how it will submit/upload data.

<%@page pageEncoding="GBK" contentType="text/html; charset=GBK"%>
+Pie Number of slices to send: Send
Thanks~~!
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1293 times.
Similar Threads
insert chinese language to mysql db
how to input chinese?
Xing Fu
JBoss Language problem
database operation with other character set
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:47:54.