Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2745

the gsp template can not support unicode(utf-8)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 1.5.5, 1.6-beta-1
    • Groovlet / GSP
    • None
    • jdk1.5,Debian/Linux,groovy1.5.4
    • Patch

    Description

      a test gsp file is (chinese encoding):

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <title>测试页</title>
      </head>
      <body>
      <%
      print "groopvy 测试页"
      %>
      </body>
      </html>

      After browser the groovy.servlet.TemplateServlet source code,I find that the service method only set the ContentType to "text/html" .There no information about encoding.
      So I add the encoding support for it,you can see the attachment(diff format),and you can configure it throgh the web.xml

      Attachments

        1. TemplateServlet.diff
          0.6 kB
          Agile Quemuel
        2. GroovyServlet.diff
          0.6 kB
          Agile Quemuel
        3. AbstractHttpServlet.diff
          0.8 kB
          Agile Quemuel

        Issue Links

          Activity

            People

              paulk Paul King
              agile Agile Quemuel
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: