It is necessary to encode a string in little-endian in an application on Erlang
for the subsequent inclusion in the binary message. There is a limit on the length
This field is 20 bytes. The string is fdQCuk_QY35F91.
1> C = "fdQCuk_QY35F91". "fdQCuk_QY35F91" 2> X = term_to_binary(C). <<131,107,0,14,102,100,81,67,117,107,95,81,89,51,53,70,57, 49>> 3> L = unicode:characters_to_binary(X, {utf16, little}). <<230,174,131,224,184,128,230,145,166,228,141,145,230,173, 181,229,133,159,227,141,153,228,152,181,227,132,185>> 4> byte_size(L). 27 The result is 27 bytes, which suggests that
The method is not correct. How to do?