Mon Jun 20 23:09:29 CEST 2005
From: "Olivier Sambourg" <olivier.sambourg@REDACTED>
>I'm having another problem with erlang external format : an integer list
>in erlang is sometimes encoded as a string (when the integers all are in
>the 0..255 range).
Yes, JInterface tries to be smart, about in the same way as the shell does.
Lists of bytes are typed/printed as strings... Sometimes it is a blessing,
sometimes a curse.
If your data may contain strings or general lists, and you don't know
beforehand which one it is, then it's a little tricky. You have to handle
But in many cases, one can only get one of those types of lists. Then if you
may have to convert an OtpErlangString to an OtpErlangList...
However, OtpErlangString inherits from OtpErlangList, so it's not that
difficult to handle them.
The same problem exists (and is slightly worse) with all the integer types.
There's too many of them! :-)
More information about the erlang-questions