-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filename encoding issue #17
Comments
This is indeed very likely due to an encoding trouble. I've more directly isolated a problem using the struct-fu test suite which is failing on Tessel again — that library is used by sdcard and fatfs for reading and writing binary fields. Filed tessel/t1-runtime#690 — the firmware recently got some improved support for Buffer encoding but one spot was missed. I'll work with the TM folks to get a fix out and/or keep struct-fu working with the new situation. Local workaroundYou can work around temporarily by changing this line in your project's "node_modules/sdcard/node_modules/fatfs/node_modules/struct-fu/lib.js": if (Buffer("\ud83c\udf91", 'utf16le')[0] !== 0x3c) require("./_workaround_tessel_358.js"); to: if (1 || Buffer("\ud83c\udf91", 'utf16le')[0] !== 0x3c) require("./_workaround_tessel_358.js"); |
Thanks Nathan, your workaround sorted out the issue for me. |
Tessel now has built-in support for the utf16le buffer encoding (tessel/t1-runtime#645) and so this issue is likely resolved. (IIRC struct-fu also got an interim fix for this.) Thanks for your original report! |
Hi,
I am trying out the example sd-card code and the file writes to the sd-card, but the file name is encoded incorrectly. This means I can not read it back again and get the error.
/app/microsd.js:19: attempt to index local 'data' (a nil value)
The text was updated successfully, but these errors were encountered: