4 Replies Latest reply on May 29, 2009 4:08 PM by Francisco Jose Peredo Noguez

    UTF-8 encoding problem

    Piotr Salski Newbie

      I must say I'm confused. I need to use UTF-8 for encoding to get polish characters. To achieve this I did following steps:
      1 I have changed components.xml



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                  .........
                  xmlns:web="http://jboss.com/products/seam/web"
                  
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                 ..........
                         http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd">
      
      
         <web:character-encoding-filter encoding="UTF-8" override-client="true" url-pattern="*.xhtml"/>
      ..........   



      2. I have changed server.xml



      <Connector port="8080" address="${jboss.bind.address}"    
               maxThreads="250" maxHttpHeaderSize="8192"
                useBodyEncodingForURI="true"  URIEncoding="UTF-8"         
                emptySessionPath="true" protocol="HTTP/1.1"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
      


      by adding


      useBodyEncodingForURI="true"  URIEncoding="UTF-8"



      and I still get error:


      ERROR [STDERR] 2009-05-27 21:34:18 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/app_userList.xhtml]
      com.sun.facelets.FaceletException: Error Parsing /app_userList.xhtml: 
      Error Traced[line: 31] Invalid byte 1 of 1-byte UTF-8 sequence.
           at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)




      and the strange thing is that characters are displayed OK as data retrieved from database, but not as static sting on xhtml page.


      WFT???


      Anybody has any idea??????????