I see where my error is. In nodejs I can load files directly from disc. In Espruino I load my files from the flash using the storage module. And this is read back as string, according to the docs. So my example was actually too short, but the hint regarding strings handling helped. Thanks.
My fix will be to pre-process the files before storing them to flash, escaping \n etc.
© Espruino, powered by microcosm.
Report a problem