[erlang-questions] Jinterface OtpErlangBinary utf-8 double encoding

Carl-Johan Kjellander carljohan.kjellander@REDACTED
Wed Dec 4 14:15:34 CET 2013


I’m having utf-8 double encoding issues when sending binaries between Java
and Erlang.

        java.lang.String foo = new java.lang.String("Föö");
        record[2] = new OtpErlangBinary(foo.getBytes());

But of course that comes back as <<"Föö">> to my erlang node.

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).

/cjk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131204/7529bf70/attachment.htm>


More information about the erlang-questions mailing list