Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2413

allow to change default string charset encoding to other than ISO-8859

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Nightly Build
    • Fix Version/s: 1.4.x
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other
    • Bugzilla Id:
      34291

      Description

      my web-app serves all pages as utf-8.

      Unfortunately, even the most recent firefox1.0.2 in form posts doesn't specify
      the charset (see also my web-app serves all pages as utf-8.

      Unfortunately, even the most recent firefox1.0.2 in form posts doesn't specify
      the charset (see also Bug 20813). Its form field headers just say
      Content-Disposition: form-data; name="subject"

      Since I do know that all replies by browsers will arrive UTF-8 encoded, it would
      be great not to have to convert the encoding for each field myself back from
      ISO-8859-1 to UTF-8, but be able to
      1) set this globally in a configuration file
      a) as a charset String or
      b) to use System.getProperty("file.encoding) or
      2) a static
      org.apache.struts.upload.CommonsMultipartRequestHandler.initCharset(String
      charSet) or
      3) use the default ISO-8859-1 as is if none of the above is specified.


      see also Bug 24465 re transfer encoding and Bug 20813 re charset

      Where it happens when using tomcat and struts:
      Thread [http-8080-Processor1] (Suspended)
      CommonsMultipartRequestHandler.addTextParameter(HttpServletRequest, FileItem)
      line: 422
      CommonsMultipartRequestHandler.handleRequest(HttpServletRequest) line: 213
      RequestUtils.populate(Object, String, String, HttpServletRequest) line: 467
      RequestProcessor.processPopulate(HttpServletRequest, HttpServletResponse,
      ActionForm, ActionMapping) line: 798
      RequestProcessor.process(HttpServletRequest, HttpServletResponse) line: 205
      ActionServlet.process(HttpServletRequest, HttpServletResponse) line: 1164
      ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line: 415
      ActionServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse)
      line: 709
      ActionServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 802
      ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252
      ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173
      StandardWrapperValve.invoke(Request, Response) line: 213
      StandardContextValve.invoke(Request, Response) line: 178
      StandardHostValve.invoke(Request, Response) line: 126
      ErrorReportValve.invoke(Request, Response) line: 105
      StandardEngineValve.invoke(Request, Response) line: 107
      CoyoteAdapter.service(Request, Response) line: 148
      Http11Processor.process(InputStream, OutputStream) line: 856
      Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
      Object[]) line: 744
      PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527
      LeaderFollowerWorkerThread.runIt(Object[]) line: 80
      ThreadPool$ControlRunnable.run() line: 684
      ThreadWithAttributes(Thread).run() line: 595 [local variables unavailable]). Its form field headers just say
      Content-Disposition: form-data; name="subject"

      Since I do know that all replies by browsers will arrive UTF-8 encoded, it would
      be great not to have to convert the encoding for each field myself back from
      ISO-8859-1 to UTF-8, but be able to
      1) set this globally in a configuration file
      a) as a charset String or
      b) to use System.getProperty("file.encoding) or
      2) a static
      org.apache.struts.upload.CommonsMultipartRequestHandler.initCharset(String
      charSet) or
      3) use the default ISO-8859-1 as is if none of the above is specified.


      see also STR-1823 re transfer encoding and my web-app serves all pages as utf-8.

      Unfortunately, even the most recent firefox1.0.2 in form posts doesn't specify
      the charset (see also Bug 20813). Its form field headers just say
      Content-Disposition: form-data; name="subject"

      Since I do know that all replies by browsers will arrive UTF-8 encoded, it would
      be great not to have to convert the encoding for each field myself back from
      ISO-8859-1 to UTF-8, but be able to
      1) set this globally in a configuration file
      a) as a charset String or
      b) to use System.getProperty("file.encoding) or
      2) a static
      org.apache.struts.upload.CommonsMultipartRequestHandler.initCharset(String
      charSet) or
      3) use the default ISO-8859-1 as is if none of the above is specified.


      see also Bug 24465 re transfer encoding and Bug 20813 re charset

      Where it happens when using tomcat and struts:
      Thread [http-8080-Processor1] (Suspended)
      CommonsMultipartRequestHandler.addTextParameter(HttpServletRequest, FileItem)
      line: 422
      CommonsMultipartRequestHandler.handleRequest(HttpServletRequest) line: 213
      RequestUtils.populate(Object, String, String, HttpServletRequest) line: 467
      RequestProcessor.processPopulate(HttpServletRequest, HttpServletResponse,
      ActionForm, ActionMapping) line: 798
      RequestProcessor.process(HttpServletRequest, HttpServletResponse) line: 205
      ActionServlet.process(HttpServletRequest, HttpServletResponse) line: 1164
      ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line: 415
      ActionServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse)
      line: 709
      ActionServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 802
      ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252
      ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173
      StandardWrapperValve.invoke(Request, Response) line: 213
      StandardContextValve.invoke(Request, Response) line: 178
      StandardHostValve.invoke(Request, Response) line: 126
      ErrorReportValve.invoke(Request, Response) line: 105
      StandardEngineValve.invoke(Request, Response) line: 107
      CoyoteAdapter.service(Request, Response) line: 148
      Http11Processor.process(InputStream, OutputStream) line: 856
      Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
      Object[]) line: 744
      PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527
      LeaderFollowerWorkerThread.runIt(Object[]) line: 80
      ThreadPool$ControlRunnable.run() line: 684
      ThreadWithAttributes(Thread).run() line: 595 [local variables unavailable] re charset

      Where it happens when using tomcat and struts:
      Thread [http-8080-Processor1] (Suspended)
      CommonsMultipartRequestHandler.addTextParameter(HttpServletRequest, FileItem)
      line: 422
      CommonsMultipartRequestHandler.handleRequest(HttpServletRequest) line: 213
      RequestUtils.populate(Object, String, String, HttpServletRequest) line: 467
      RequestProcessor.processPopulate(HttpServletRequest, HttpServletResponse,
      ActionForm, ActionMapping) line: 798
      RequestProcessor.process(HttpServletRequest, HttpServletResponse) line: 205
      ActionServlet.process(HttpServletRequest, HttpServletResponse) line: 1164
      ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line: 415
      ActionServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse)
      line: 709
      ActionServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 802
      ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252
      ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173
      StandardWrapperValve.invoke(Request, Response) line: 213
      StandardContextValve.invoke(Request, Response) line: 178
      StandardHostValve.invoke(Request, Response) line: 126
      ErrorReportValve.invoke(Request, Response) line: 105
      StandardEngineValve.invoke(Request, Response) line: 107
      CoyoteAdapter.service(Request, Response) line: 148
      Http11Processor.process(InputStream, OutputStream) line: 856
      Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
      Object[]) line: 744
      PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527
      LeaderFollowerWorkerThread.runIt(Object[]) line: 80
      ThreadPool$ControlRunnable.run() line: 684
      ThreadWithAttributes(Thread).run() line: 595 [local variables unavailable]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hauser@acm.org Ralf Hauser
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: