Revision history [back]

click to hide/show revision 1
initial version

asked 2014-05-06 12:16:36 +0800

gsanmartin gravatar image gsanmartin

UTF-8 not working properly in ZK

I am developing a webapp using ZK and I have stumbled upon my first problem, regarding UTF-8 encoding. I set my files to this encoding and when rendering my pages I get the unicode codes (for example, when it should read Contraseña, it says Contrase\u00F1a)

What am I doing wrong? I am using ZK 7.0.1

UTF-8 not working properly in ZK

I am developing a webapp using ZK and I have stumbled upon my first problem, regarding UTF-8 encoding. I set my files to this encoding and when rendering my pages I get the unicode codes (for example, when it should read Contraseña, it says Contrase\u00F1a)

What am I doing wrong? I am using ZK 7.0.1

<groupbox> Login <h:form id="f" name="f" action="j_spring_security_check" method="POST"> <grid> <columns sizable="false"> <column width="50%"/> <column width="50%"/> </columns> <rows> <row> <label value="${labels.aplicacion.usuario}"/> <textbox id="u" name="j_username"/> </row> <row> <label value="${labels.aplicacion.password}"/> <textbox id="p" type="password" name="j_password"/> </row> <row spans="2">

<h:input type="submit" value="login"/> <h:input type="reset" value="Reset"/>
</row> </rows> </grid> </h:form> </groupbox>

UTF-8 not working properly in ZK

I am developing a webapp using ZK and I have stumbled upon my first problem, regarding UTF-8 encoding. I set my files to this encoding and when rendering my pages I get the unicode codes (for example, when it should read Contraseña, it says Contrase\u00F1a)

What am I doing wrong? I am using ZK 7.0.1

<groupbox>
          Login
  <caption>Login</caption>
        <h:form id="f" name="f" action="j_spring_security_check" method="POST">
             <grid>
                 <columns sizable="false">
                     <column width="50%"/>
  width="50%" />
                    <column width="50%"/>
  width="50%" />
                </columns>
                 <rows>
                     <row>
                         <label value="${labels.aplicacion.usuario}"/>
  value="${labels.aplicacion.usuario}" />
                        <textbox id="u" name="j_username"/>
  name="j_username" />
                    </row>
                     <row>
                         <label value="${labels.aplicacion.password}"/>
  value="${labels.aplicacion.password}" />
                        <textbox id="p" type="password" name="j_password"/>
  name="j_password" />
                    </row>
                     <row spans="2">
                         

<div align="center"> <h:input type="submit" value="login"/> value="login" /> <h:input type="reset" value="Reset"/> value="Reset" /> </div> </row> </rows> </grid> </h:form> </groupbox>

And this is the lines in my zk.xml that declare the resource bundle file:

<library-property>
        <name>org.zkoss.web.preferred.locale</name>
        <value>es_ES</value>
    </library-property>

    <system-config>
        <label-location>/WEB-INF/i18n/i18n.properties</label-location>
    </system-config>
</row> </rows> </grid> </h:form> </groupbox>

UTF-8 not working properly in ZK

I am developing a webapp using ZK and I have stumbled upon my first problem, regarding UTF-8 encoding. I set my files to this encoding and when rendering my pages I get the unicode codes (for example, when it should read Contraseña, it says Contrase\u00F1a)

What am I doing wrong? I am using ZK 7.0.1

<groupbox>
     <caption>Login</caption>
     <h:form id="f" name="f" action="j_spring_security_check" method="POST">
         <grid>
             <columns sizable="false">
                 <column width="50%" />
                 <column width="50%" />
             </columns>
             <rows>
                 <row>
                     <label value="${labels.aplicacion.usuario}" />
                     <textbox id="u" name="j_username" />
                 </row>
                 <row>
                     <label value="${labels.aplicacion.password}" />
                     <textbox id="p" type="password" name="j_password" />
                 </row>
                 <row spans="2">
                     <div align="center">
                         <h:input type="submit" value="login" />
                         <h:input type="reset" value="Reset" />
                     </div>
                 </row>
             </rows>
         </grid>
     </h:form>
 </groupbox>

And this is the lines in my zk.xml that declare the resource bundle file:

<library-property>
     <name>org.zkoss.web.preferred.locale</name>
     <value>es_ES</value>
 </library-property>

 <system-config>
     <label-location>/WEB-INF/i18n/i18n.properties</label-location>
 </system-config>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More