[erlang-questions] unexpected result of term_to_binary
Mon Jan 21 22:36:02 CET 2013
The BERT protocol specification (http://bert-rpc.org/) does not support
strings at all. I guess you are supposed to encode strings at a higher
layer as int-lists or binaries, which goes along with what Joe is saying.
Having written a Python ETF module, I have to admit I was confused by
STRING_EXT and strings. Once you realize there are no strings, life gets
On Mon, Jan 21, 2013 at 2:13 PM, Dmitry Kolesnikov
> Hi Steve,
> There is a well document External Term Format protocol. I am not here to
> judge that protocol but it is implementable on other languages as well (
> https://github.com/rustyio/BERT-JS). Yes, it make sense in scopes of that
> protocol specification.
> Long time ago, I've been trying to use it for WebApp development and …
> switched to JSON. :-)
> But I strongly believe that External Term Format make sense for other
> Best Regards,
> On Jan 21, 2013, at 10:00 PM, Steve Davis <steven.charles.davis@REDACTED>
> > Hi Dmitry,
> > It "makes sense" only if the "binary_to_term" decode is done in erlang.
> > br,
> > /s
> > On Jan 21, 2013, at 1:53 PM, Dmitry Kolesnikov <dmkolesnikov@REDACTED>
> >> Hello,
> >> This make sense to me!
> >> term_to_binary/1 returns a binary data object which is the result of
> encoding Term according to the Erlang external term format. See
> >> Use list_to_binary or unicode:character_to_binary depends on your
> >> - Dmitry
> >> On Jan 21, 2013, at 9:38 PM, Steve Davis <
> steven.charles.davis@REDACTED> wrote:
> >>> The following appears to encode lists of integers as strings (?!?):
> >>> Eshell V5.9.3 (abort with ^G)
> >>> 1> term_to_binary([1,2,3,4]).
> >>> <<131,107,0,4,1,2,3,4>>
> >>> Is there a reason for this that I'm missing?
> >>> regs,
> >>> /s
> >>> _______________________________________________
> >>> erlang-questions mailing list
> >>> erlang-questions@REDACTED
> >>> http://erlang.org/mailman/listinfo/erlang-questions
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions