You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/03/04 07:21:13 UTC
DO NOT REPLY [Bug 27425] New: -
Asian character language encoding support
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27425>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27425
Asian character language encoding support
Summary: Asian character language encoding support
Product: Axis
Version: 1.1
Platform: All
OS/Version: All
Status: NEW
Severity: Critical
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@ws.apache.org
ReportedBy: phpme@citiz.net
I found Asian character was wrong encoded in admin page and WSDL.
In AxisServlet.java, I found following lines:
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
if (isDebug)
log.debug("Enter: doGet()");
PrintWriter writer = response.getWriter();
....
....
In Servlet2.3 spec, there is following lines:
Response.setContentType(String)
public void setContentType(java.lang.String type) Sets the content type of the
response being sent to the client. The content type may include the type of
character encoding used, for example, text/html; charset=ISO-8859-4.
If obtaining a PrintWriter, this method should be called first.
If no content type is setted, the default ISO-8859-1 encoding writer will be
retrieved, and asian charator will be wrong encoded. So I think an encoding
type configuration should be provided in config files, and the default should
be "UTF-8" to support almost all languages.
It seemed most of the servlets should add a line before getting the Writer:
response.setContentType("text/html; charset=utf-8");