it seems that $read() will stop if it finds some characters it considers "binary"
I've been trying to paste the raw utf-16 content of a file, and it will stop after the control characters, i think the behaviour should be to ignore chars that can cause trouble, and to return the other ones.
If there's a workaround i dont mind hearing about it though.