Special characters need to be escaped in a Java Web application
•
Java
I am using Oracle DB to develop Java EE applications
€˜T’ ! “One Chase.†$% & ( ) ' / : ? ` — – _ ‚ " Test
Someone knows what character codes are. How can I escape them? I need to escape them and replace them with blanks
Solution
These characters are a side effect of the code, which does not handle the encoding correctly (assuming that UTF-8 is iso-8859-1 and vice versa) – they are now garbage You need to fix your app to render them correctly There is no need to replace them with spaces or any filtering
Read this article http://www.joelonsoftware.com/articles/Unicode.html Then check the database interaction and JSP and application server settings
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码