axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27425] New: - Asian character language encoding support
Date Thu, 04 Mar 2004 06:21:13 GMT
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");

Mime
View raw message