You probably already do. But I’m guessing your source is not UTF, but rather some common Windows page, and 224 is the character you’re looking for. Because 10 is “\n”. When a char list is all ASCII chars it is displayed as a string, otherwise it is displayed as a list of byte values.
And the reason the first form does not work is that many older erlang commands only take char lists, not binaries. BTW, ‘echo toto’ would work just as well, as long as you’re using constants. (Of course if you have a binary arg passed in, then you’ll need that to_charlist call.)
Indeed, that was silly of me to think otherwise. I had an encoding issu that I had a hard time to solve and I was investigating all the possibilities. It turned out that Docker was causing the problem.