Project

General

Profile

JWt converting é to é

Added by Kushan Gunaratne almost 9 years ago

Hi,

I input é into WLineEdit but it always return é.

WLineEdit nameLineEdit = new WLineEdit("é");

nameLineEdit.getText(); // returns é

Any suggestions for this character encoding issue...

Thanks

Kushan


Replies (2)

RE: JWt converting é to é - Added by Wim Dumon almost 9 years ago

We use a filter to ensure that tomcat sets the proper charset encodings for the pages served by Wt:

  <filter>
     <filter-name>SetCharacterEncoding</filter-name>
         <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
     <init-param>
       <param-name>encoding</param-name>
       <param-value>UTF-8</param-value>
     </init-param>
  </filter>

  <filter-mapping>
        <filter-name>SetCharacterEncoding</filter-name>
        <url-pattern>/*</url-pattern>
  </filter-mapping>

RE: JWt converting é to é - Added by Kushan Gunaratne almost 9 years ago

I solved my issue.

Thanks Wim

    (1-2/2)