Thank you for merging the pull request. Could I send a pull request converting to UTF-8 encoding against the theme properties?<br><br><div class="gmail_quote"><div dir="ltr">2016年7月7日(木) 21:39 Hiroyuki Wada &lt;<a href="mailto:wadahiro@gmail.com">wadahiro@gmail.com</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes. I will send a pull request later!<br><br><div class="gmail_quote"><div dir="ltr">2016年7月7日(木) 21:20 Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you doing a PR as well?</div><div class="gmail_extra"><br><div class="gmail_quote">On 7 July 2016 at 12:33, Hiroyuki Wada <span dir="ltr">&lt;<a href="mailto:wadahiro@gmail.com" target="_blank">wadahiro@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok. I created a JIRA issue.<div><a href="https://issues.jboss.org/browse/KEYCLOAK-3278" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-3278</a><br><br><div class="gmail_quote"><div dir="ltr">2016年7月6日(水) 19:36 Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;:<br></div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Let&#39;s go for it. Please create a JIRA and send PR. Please just use &quot;# encoding: utf-8&quot; and not &quot;<span style="font-size:12.8px"># -*- coding: utf-8 -*-&quot;. The latter is just weird if you ask me.</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thomas: It&#39;s optional, defaults to iso-8859-1 and the header will clearly state that a file uses a different encoding, so I disagree that there will be any confusion.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 July 2016 at 12:30, Hiroyuki Wada <span dir="ltr">&lt;<a href="mailto:wadahiro@gmail.com" target="_blank">wadahiro@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Jul 6, 2016 at 6:53 PM, Thomas Raehalme<br>
&lt;<a href="mailto:thomas.raehalme@aitiofinland.com" target="_blank">thomas.raehalme@aitiofinland.com</a>&gt; wrote:<br>
&gt; From the javadoc of java.util.ResourceBundle the encoding for .properties is<br>
&gt; still expected to be ISO-8859-1:<br>
&gt;<br>
&gt;&gt; Constructing a PropertyResourceBundle instance from an InputStream<br>
&gt;&gt; requires that the input stream be encoded in ISO-8859-1. In that case,<br>
&gt;&gt; characters that cannot be represented in ISO-8859-1 encoding must be<br>
&gt;&gt; represented by Unicode Escapes as defined in section 3.3 of The Java™<br>
&gt;&gt; Language Specification whereas the other constructor which takes a Reader<br>
&gt;&gt; does not have that limitation.<br>
<br>
</span>It&#39;s a case of using constructor which takes an InputStream.<br>
It says we can use any encoding when we use the other constructor<br>
which takes a Reader.<br>
<br>
I understand your concern. So what do you think supporting utf-8 with<br>
a header like Stian suggested?<br>
I think it can avoid confusion because the encoding is noted in the<br>
file itself...<br>
<br>
Regards,<br>
<div><div><br>
&gt; <a href="https://docs.oracle.com/javase/8/docs/api/java/util/PropertyResourceBundle.html" rel="noreferrer" target="_blank">https://docs.oracle.com/javase/8/docs/api/java/util/PropertyResourceBundle.html</a><br>
&gt;<br>
&gt; I understand that Spring allows one to read .properties using any encoding,<br>
&gt; but you need to specify the encoding in Spring configuration external to the<br>
&gt; .properties file.<br>
&gt;<br>
&gt; In my opinion it would cause unnecessary confusion amongst developers to use<br>
&gt; any other encoding than the one defined by the official documentation for<br>
&gt; Properties.<br>
&gt;<br>
&gt; Best regards,<br>
&gt; Thomas<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Jul 6, 2016 at 12:40 PM, Hiroyuki Wada &lt;<a href="mailto:wadahiro@gmail.com" target="_blank">wadahiro@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I think it was true before Java 1.6 because Java standard library<br>
&gt;&gt; (java.util.ResourceBundle or java.util.Properties) only supported<br>
&gt;&gt; ISO-8859-1 encoding file.<br>
&gt;&gt; But they support any encoding after Java 1.6. There are some<br>
&gt;&gt; frameworks which can read .properties with any encoding. For example,<br>
&gt;&gt; Spring Framework can read .properties with any encoding. I think it&#39;s<br>
&gt;&gt; very useful to read UTF-8 directly for multibyte language country.<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Jul 6, 2016 at 3:32 PM, Thomas Raehalme<br>
&gt;&gt; &lt;<a href="mailto:thomas.raehalme@aitiofinland.com" target="_blank">thomas.raehalme@aitiofinland.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Please correct me if I am wrong, but I have been under the impression<br>
&gt;&gt; &gt; that<br>
&gt;&gt; &gt; Java .properties files should always use encoding ISO-8859-1. Characters<br>
&gt;&gt; &gt; not<br>
&gt;&gt; &gt; present in ISO-8859-1 can be written in \uxxxx. Won&#39;t it make things<br>
&gt;&gt; &gt; confusing to developers if another encoding is used here instead?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-" rel="noreferrer" target="_blank">https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#store-java.io.OutputStream-java.lang.String-" rel="noreferrer" target="_blank">https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#store-java.io.OutputStream-java.lang.String-</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If alternate encodings are desired how about supporting the XML format<br>
&gt;&gt; &gt; of<br>
&gt;&gt; &gt; Properties?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Best regards,<br>
&gt;&gt; &gt; Thomas<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wed, Jul 6, 2016 at 9:04 AM, Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Both iso-8859-1 and utf-8 message bundles should be able to co-exist.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; We can allow specifying the encoding in a comment on the first line<br>
&gt;&gt; &gt;&gt; like<br>
&gt;&gt; &gt;&gt; this:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; # encoding=utf-8<br>
&gt;&gt; &gt;&gt; key=value<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; # encoding=iso-8859-1<br>
&gt;&gt; &gt;&gt; key=value<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; If the first line in the file doesn&#39;t contain the comment with the<br>
&gt;&gt; &gt;&gt; encoding then we should default to iso-8859-1 for backwards<br>
&gt;&gt; &gt;&gt; compatibility<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On 5 July 2016 at 09:49, Hiroyuki Wada &lt;<a href="mailto:wadahiro@gmail.com" target="_blank">wadahiro@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Thanks for your comment.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; If we want to change to utf-8 we&#39;d still need to support iso.. for<br>
&gt;&gt; &gt;&gt;&gt; &gt; backwards compatibility.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; If we change to UTF-8, we can still read unicode codepoint like<br>
&gt;&gt; &gt;&gt;&gt; &#39;\u00e8&#39;.<br>
&gt;&gt; &gt;&gt;&gt; There is an incompatibility when non-ascii characters are used in<br>
&gt;&gt; &gt;&gt;&gt; message properties.<br>
&gt;&gt; &gt;&gt;&gt; The non-ascii characters are 0xA0 - 0xFF codes (please refer codepage<br>
&gt;&gt; &gt;&gt;&gt; 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>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; I think the non-ascii characters might be used in French messages like<br>
&gt;&gt; &gt;&gt;&gt; &#39;à&#39; so I agree to support ISO-8859-1 for backwards compatibility.<br>
&gt;&gt; &gt;&gt;&gt; To support this, I think we can add a property like &quot;messageEncoding&quot;<br>
&gt;&gt; &gt;&gt;&gt; in keycloak-server.json as below. Is it a good idea?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;     &quot;theme&quot;: {<br>
&gt;&gt; &gt;&gt;&gt;         &quot;staticMaxAge&quot;: 2592000,<br>
&gt;&gt; &gt;&gt;&gt;         &quot;cacheTemplates&quot;: true,<br>
&gt;&gt; &gt;&gt;&gt;         &quot;cacheThemes&quot;: true,<br>
&gt;&gt; &gt;&gt;&gt;         &quot;messageEncoding&quot;: &quot;ISO-8859-1&quot;,<br>
&gt;&gt; &gt;&gt;&gt;         &quot;folder&quot;: {<br>
&gt;&gt; &gt;&gt;&gt;           &quot;dir&quot;: &quot;${jboss.home.dir}/themes&quot;<br>
&gt;&gt; &gt;&gt;&gt;         }<br>
&gt;&gt; &gt;&gt;&gt;     },<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Regards,<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On Mon, Jul 4, 2016 at 10:33 PM, Stian Thorgersen<br>
&gt;&gt; &gt;&gt;&gt; &lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt; We have in the past discussed this and decided to stick with<br>
&gt;&gt; &gt;&gt;&gt; &gt; ISO-8859-1.<br>
&gt;&gt; &gt;&gt;&gt; &gt; That was probably not the best idea though. If we want to change to<br>
&gt;&gt; &gt;&gt;&gt; &gt; utf-8<br>
&gt;&gt; &gt;&gt;&gt; &gt; we&#39;d still need to support iso.. for backwards compatibility.<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; On 4 July 2016 at 14:37, Bruno Oliveira &lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; It makes sense, maybe file a Jira associated with:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; <a href="https://issues.jboss.org/browse/KEYCLOAK-3259" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-3259</a> ?<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; On 2016-07-04, Hiroyuki Wada wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Hello all,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I am trying to translate all base theme messages to my country<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; language, Japanese. And I&#39;d like to contribute them. Before that<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; work,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I&#39;d like to propose about the files encoding.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Currently, the message files (*.properties) are loaded with<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; ISO-8859-1<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; encoding. Therefore, it is necessary to convert the files by<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; &#39;native2ascii&#39; command beforehand. However we can directly read<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; property files with UTF-8 encoding in java 1.6 or later because<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; &#39;java.util.Properties#load(java.io.Reader)&#39; method was introduced<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; as<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; below.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; <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>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; So, my proposal is supporting the message files with UTF-8<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; encoding.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; believe that it&#39;s very developers/customers friendly. In<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; addition,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; we<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; can easily review the translated messages on the github pull<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; request<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; view and so on. What do you think?<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; If it&#39;s ok, I&#39;ll create a JIRA issue and create a pull request.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Hiroyuki Wada,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Developer,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Nomura Research Institute, Ltd.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; keycloak-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; abstractj<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; PGP: 0x84DC9914<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; keycloak-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; keycloak-dev mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<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></div></div></blockquote></div><br></div>
</blockquote></div></div></div></div>
</blockquote></div><br></div>
</blockquote></div></blockquote></div>