-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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>
Hello gsanmartin, in my job I work with eclipse and it sets the system default settings. Mac is utf-8 and windows is win-1252. maybe your project is in a different pattern from the zk zul and this may be conflicting. I hope this could help. Greetings ...
Asked: 2014-05-06 12:16:36 +0800
Seen: 28 times
Last updated: May 22 '14
show your zul please
chillworld ( 2014-05-06 12:36:55 +0800 )editI just did. I am using resource bundle properties files.
gsanmartin ( 2014-05-06 12:42:57 +0800 )editI can only post here, but your answer did not work for me :(
gsanmartin ( 2014-05-06 14:40:04 +0800 )editI don't use the label-location and it works fine for me. Do you have something like this at the beginning of your zul? <?xml version="1.0" encoding="UTF-8"?>
cocoes ( 2014-05-08 10:25:50 +0800 )edit