<div dir="ltr">Please correct me if I am wrong, but I have been under the impression that Java .properties files should always use encoding ISO-8859-1. Characters not present in ISO-8859-1 can be written in \uxxxx. Won't it make things confusing to developers if another encoding is used here instead?<div><br></div><div><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-">https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-</a><br><div><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#store-java.io.OutputStream-java.lang.String-">https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#store-java.io.OutputStream-java.lang.String-</a></div><div><br></div><div>If alternate encodings are desired how about supporting the XML format of Properties?</div><div><br></div><div>Best regards,</div><div>Thomas</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 9:04 AM, Stian Thorgersen <span dir="ltr"><<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Both iso-8859-1 and utf-8 message bundles should be able to co-exist. <div><br><div>We can allow specifying the encoding in a comment on the first line like this:</div><div><br></div><div># encoding=utf-8</div><div>key=value</div><div><br></div><div><div># encoding=iso-8859-1</div><div>key=value</div></div></div><div><br></div><div>If the first line in the file doesn't contain the comment with the encoding then we should default to iso-8859-1 for backwards compatibility</div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 5 July 2016 at 09:49, Hiroyuki Wada <span dir="ltr"><<a href="mailto:wadahiro@gmail.com" target="_blank">wadahiro@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Thanks for your comment.<br>
<span><br>
> If we want to change to utf-8 we'd still need to support iso.. for backwards compatibility.<br>
<br>
</span>If we change to UTF-8, we can still read unicode codepoint like '\u00e8'.<br>
There is an incompatibility when non-ascii characters are used in<br>
message properties.<br>
The non-ascii characters are 0xA0 - 0xFF codes (please refer codepage<br>
layout: <a href="https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Codepage_layout" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Codepage_layout</a> )<br>
<br>
I think the non-ascii characters might be used in French messages like<br>
'à' so I agree to support ISO-8859-1 for backwards compatibility.<br>
To support this, I think we can add a property like "messageEncoding"<br>
in keycloak-server.json as below. Is it a good idea?<br>
<br>
"theme": {<br>
"staticMaxAge": 2592000,<br>
"cacheTemplates": true,<br>
"cacheThemes": true,<br>
"messageEncoding": "ISO-8859-1",<br>
"folder": {<br>
"dir": "${jboss.home.dir}/themes"<br>
}<br>
},<br>
<br>
Regards,<br>
<div><div><br>
On Mon, Jul 4, 2016 at 10:33 PM, Stian Thorgersen <<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>> wrote:<br>
> We have in the past discussed this and decided to stick with ISO-8859-1.<br>
> That was probably not the best idea though. If we want to change to utf-8<br>
> we'd still need to support iso.. for backwards compatibility.<br>
><br>
> On 4 July 2016 at 14:37, Bruno Oliveira <<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>> wrote:<br>
>><br>
>> It makes sense, maybe file a Jira associated with:<br>
>> <a href="https://issues.jboss.org/browse/KEYCLOAK-3259" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-3259</a> ?<br>
>><br>
>> On 2016-07-04, Hiroyuki Wada wrote:<br>
>> > Hello all,<br>
>> ><br>
>> > I am trying to translate all base theme messages to my country<br>
>> > language, Japanese. And I'd like to contribute them. Before that work,<br>
>> > I'd like to propose about the files encoding.<br>
>> ><br>
>> > Currently, the message files (*.properties) are loaded with ISO-8859-1<br>
>> > encoding. Therefore, it is necessary to convert the files by<br>
>> > 'native2ascii' command beforehand. However we can directly read the<br>
>> > property files with UTF-8 encoding in java 1.6 or later because<br>
>> > 'java.util.Properties#load(java.io.Reader)' method was introduced as<br>
>> > below.<br>
>> ><br>
>> ><br>
>> > <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)" rel="noreferrer" target="_blank">http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)</a><br>
>> ><br>
>> > So, my proposal is supporting the message files with UTF-8 encoding. I<br>
>> > believe that it's very developers/customers friendly. In addition, we<br>
>> > can easily review the translated messages on the github pull request<br>
>> > view and so on. What do you think?<br>
>> ><br>
>> > If it's ok, I'll create a JIRA issue and create a pull request.<br>
>> ><br>
>> > Regards,<br>
>> ><br>
>> > --<br>
>> > Hiroyuki Wada,<br>
>> > Developer,<br>
>> > Nomura Research Institute, Ltd.<br>
>> > _______________________________________________<br>
>> > keycloak-dev mailing list<br>
>> > <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
>> > <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
>><br>
>> --<br>
>><br>
>> abstractj<br>
>> PGP: 0x84DC9914<br>
>> _______________________________________________<br>
>> keycloak-dev mailing list<br>
>> <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br><br>
</div></div></div></div>