<div dir="ltr">Yes sorry, you&#39;re right, the issue starts with the null code point. Python seems to have problems starting there too. It might work if we took that out.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jul 16, 2014 at 11:17 AM, Andreas Schildbach <span dir="ltr">&lt;<a href="mailto:andreas@schildbach.de" target="_blank">andreas@schildbach.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Guys, you are always talking about the Unicode astral plane, but in fact<br>
its a plain old (ASCII) control character where this problem starts and<br>
likely ends: \u0000.<br>
<br>
Let&#39;s ban/filter ISO control characters and be done with it. Most<br>
control characters will never be enterable by any keyboard into a<br>
password field. Of course I assume that Character.isISOControl() works<br>
consistently across platforms.<br>
<br>
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isISOControl%28char%29" target="_blank">http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isISOControl%28char%29</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 07/16/2014 12:23 AM, Aaron Voisine wrote:<br>
&gt; If the user creates a password on an iOS device with an astral<br>
&gt; character and then can&#39;t enter that password on a JVM wallet, that<br>
&gt; sucks. If JVMs really can&#39;t support unicode NFC then that&#39;s a strong<br>
&gt; case to limit the spec to the subset of unicode that all popular<br>
&gt; platforms can support, but it sounds like it might just be a JVM<br>
&gt; string library bug that could hopefully be reported and fixed. I get<br>
&gt; the same result as in the test case using apple&#39;s<br>
&gt; CFStringNormalize(passphrase, kCFStringNormalizationFormC);<br>
&gt;<br>
&gt; Aaron Voisine<br>
&gt; <a href="http://breadwallet.com" target="_blank">breadwallet.com</a><br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jul 15, 2014 at 11:20 AM, Mike Hearn &lt;<a href="mailto:mike@plan99.net">mike@plan99.net</a>&gt; wrote:<br>
&gt;&gt; Yes, we know, Andreas&#39; code is indeed doing normalisation.<br>
&gt;&gt;<br>
&gt;&gt; However it appears the output bytes end up being different. What I get back<br>
&gt;&gt; is:<br>
&gt;&gt;<br>
&gt;&gt; cf930001303430300166346139<br>
&gt;&gt;<br>
&gt;&gt; vs<br>
&gt;&gt;<br>
&gt;&gt; cf9300f0909080f09f92a9<br>
&gt;&gt;<br>
&gt;&gt; from the spec.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure why. It appears this is due to the character from the astral<br>
&gt;&gt; planes. Java is old and uses 16 bit characters internally - it wouldn&#39;t<br>
&gt;&gt; surprise me if there&#39;s some weirdness that means it doesn&#39;t/won&#39;t support<br>
&gt;&gt; this kind of thing.<br>
&gt;&gt;<br>
&gt;&gt; I recommend instead that any implementation that wishes to be compatible<br>
&gt;&gt; with JVM based wallets (I suspect Android is the same) just refuse any<br>
&gt;&gt; passphrase that includes characters outside the BMP. At least unless someone<br>
&gt;&gt; can find a fix. I somehow doubt this will really hurt anyone.<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------------------<br>
&gt;&gt; Want fast and easy access to all the code in your enterprise? Index and<br>
&gt;&gt; search up to 200,000 lines of code with a free copy of Black Duck<br>
&gt;&gt; Code Sight - the same software that powers the world&#39;s largest code<br>
&gt;&gt; search on Ohloh, the Black Duck Open Hub! Try it now.<br>
&gt;&gt; <a href="http://p.sf.net/sfu/bds" target="_blank">http://p.sf.net/sfu/bds</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bitcoin-development mailing list<br>
&gt;&gt; <a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
&gt;&gt; <a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Want fast and easy access to all the code in your enterprise? Index and<br>
&gt; search up to 200,000 lines of code with a free copy of Black Duck<br>
&gt; Code Sight - the same software that powers the world&#39;s largest code<br>
&gt; search on Ohloh, the Black Duck Open Hub! Try it now.<br>
&gt; <a href="http://p.sf.net/sfu/bds" target="_blank">http://p.sf.net/sfu/bds</a><br>
&gt;<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Want fast and easy access to all the code in your enterprise? Index and<br>
search up to 200,000 lines of code with a free copy of Black Duck<br>
Code Sight - the same software that powers the world&#39;s largest code<br>
search on Ohloh, the Black Duck Open Hub! Try it now.<br>
<a href="http://p.sf.net/sfu/bds" target="_blank">http://p.sf.net/sfu/bds</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
</div></div></blockquote></div><br></div>