[keycloak-user] Template properties file encoding

Peter Bardáč bardacp at gmail.com
Thu Jan 8 10:05:13 EST 2015


As Ivan Perdomo stated in another message encoding ISO 8859-1 should be 
used when saving .properties file.
So I am not sure if this is bug as it part of standard:

Java properties are expected to be encoded using "ISO 8859-1"

> "is assumed to use the ISO 8859-1 character encoding; that is each
> byte is one Latin1 character. Characters not in Latin1, and certain
> special characters, are represented in keys and elements using Unicode
> escapes as defined in section 3.3 of The Java™ Language
> Specification."


Btw utf-8 works without problem on templates

Dne 8.1.2015 v 15:31 Stian Thorgersen napsal(a):
> I reckon all templates and properties files should be utf-8 so submit a bug and we'll fix
>
> ----- Original Message -----
>> From: "Peter Bardáč" <bardacp at gmail.com>
>> To: keycloak-user at lists.jboss.org
>> Sent: Thursday, 8 January, 2015 2:41:13 PM
>> Subject: [keycloak-user] Template properties file encoding
>>
>> Hi,
>>
>> I want to use UTF-8 encoding in keycloak theme but I have problem with
>> messages.properties file.
>> For example I have é symbol in this file but it translates into é (in
>> login.ftl there is ${rb.usernameOrEmail}).
>>
>> But when I type symbol é right into login.ftl file it renders with no
>> problem. So I assume there is problem with Freemarker <->
>> messsages.properties file parsing.
>>
>> I have modified template.ftl file to use <meta http-equiv="Content-Type"
>> content="text/html; charset=utf-8" />
>>
>> I also saved these files with UTF-8 encoding and also added
>> -Dfile.encoding=UTF-8 to JAVA_OPTS in standalone.conf
>>
>> At this moment I have no idea what else should I try please help.
>>
>> P.S. I would hardcode strings into login.ftl file but I cannot hardcode
>> string for invalid uname/passwd message.
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user



More information about the keycloak-user mailing list