<div dir="ltr"><div><div>Ok, it is just a display thing in R15B.<br><br>(moose@rymdborje)67> <<"Föö"/utf8>>. <br><<"Föö">><br>(moose@rymdborje)68> <<"Föö">>. <br>
<<"Föö">><br><br></div>I thought the latter was utf-8 but probably not then, but the crazy unicode-list-thingee.<br><br></div>/cjk<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Dec 4, 2013 at 3:10 PM, Carl-Johan Kjellander <span dir="ltr"><<a href="mailto:carljohan.kjellander@gmail.com" target="_blank">carljohan.kjellander@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>(moose@rymdborje)58> <<_:8, A1/utf8, A2/utf8>> = <<"Föö">>. <br>** exception error: no match of right hand side value <<"Föö">><br><br></div>
So what is the correct way of seeing it in the shell? Should I see it as the correct character or the utf-8 encoded ones?<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">/cjk<br>
</font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 4, 2013 at 2:57 PM, Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>This is correct UTF8 binary.</div><div><br></div><div><div>
unicode:characters_to_list(B). </div><div>"Föö"</div></div><div><br></div><div><<_:8, A1/utf8, A2/utf8>> = <<"Föö">>.</div><div>A1 = 246</div><div><br></div><div>- Dmitry</div>
<div><br></div><div><div><div><div><div>On Dec 4, 2013, at 3:15 PM, Carl-Johan Kjellander <<a href="mailto:carljohan.kjellander@gmail.com" target="_blank">carljohan.kjellander@gmail.com</a>> wrote:</div><br>
</div></div><blockquote type="cite"><div><div><div dir="ltr"><div><p style="margin:1.2em 0px!important">I’m having utf-8 double encoding issues when sending binaries between Java and Erlang.</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)"> java.lang.String foo = <span style="color:rgb(51,51,51);font-weight:bold">new</span> java.lang.String(<span style="color:rgb(221,17,68)">"Föö"</span>);
record[<span style="color:rgb(0,153,153)">2</span>] = <span style="color:rgb(51,51,51);font-weight:bold">new</span> OtpErlangBinary(foo.getBytes());</code></pre><p style="margin:1.2em 0px!important">But of course that comes back as <<"Föö">> to my erlang node.</p>
<p style="margin:1.2em 0px!important">Anyone have an idea why? Or how to fix? I'm compiling the java code with -encoding UTF-8 and using Erlang R15B (erts-5.9).</p><p style="margin:1.2em 0px!important">/cjk</p><p style="margin:1.2em 0px!important">
<br></p></div></div></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>