[erlang-questions] Java and Erlang. Russian chars

Andrey Shnayder <>
Tue May 19 20:17:06 CEST 2009


I have updated my erlang to version R13B, it contains the 'unicode' module.
As David wrote: 1> unicode:characters_to_binary([1081,1094,1091]).
<<208,185,209,134,209,131>> For versions R12B it may be implemented as you
have described.
Thanks all!

2009/5/19 Hasan Veldstra <>

>
>
> Both [1081,1094,1091] and [208,185,209,134,209,131] represent the same
> Russian text ("йцу") in different encodings.  The first list is UTF-32, the
> second is UTF-8.
>
> 1> xmerl_ucs:to_utf8([1081,1094,1091]).
> [208,185,209,134,209,131]
> 2> xmerl_ucs:from_utf8([208,185,209,134,209,131]).
> [1081,1094,1091]
>
> /Hasan
>
>
> --
> http://twitter.com/hasanv
>
>
> On 18 May 2009, at 13:20PM, Andrey Shnayder wrote:
>
>  Hi,
>>
>> I have integrated java and erlang, but I have a problem with russian chars
>> which I send from java. It was received as, for example, [1081,1094,1091],
>> although it must was appeared as [208,185,209,134,209,131]. However russian
>> chars in the erlang function answer was normally processed by java.
>> Can you help me, please? Where the problem is?
>>
>> --
>> Best regards,
>> Andrey.
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
>
>


-- 
Best regards,
Andrey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090519/19c91bb0/attachment.html>


More information about the erlang-questions mailing list