diff --git a/CHANGELOG.md b/CHANGELOG.md index c37572301..815ada806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * OFW PR 4362: NFC: Fix BusFault in Write to Initial Card (by @akrylysov) * Apps: Build tag (**27mar2026**) - **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev) ## Other changes +* OFW PR 4364: JS: Address utf8 support when uploading JavaScript application (by @bekindpleaserewind) * Display: Extend lcd contrast range to full ST756x 6-bit range (by @ShaTie) (reduced to -10 to +18 to avoid fully unreadable state)

#### Known NFC post-refactor regressions list: diff --git a/applications/system/js_app/packages/fz-sdk/sdk.js b/applications/system/js_app/packages/fz-sdk/sdk.js index 2cd1c6ab3..1e9496c30 100644 --- a/applications/system/js_app/packages/fz-sdk/sdk.js +++ b/applications/system/js_app/packages/fz-sdk/sdk.js @@ -153,10 +153,11 @@ async function upload(config) { port.write(`storage remove ${config.output}\x0d`); port.drain(); await waitFor(">: ", 1000); - port.write(`storage write_chunk ${config.output} ${appFile.length}\x0d`); + const appFileBuffer = Buffer.from(appFile, "utf8"); + port.write(`storage write_chunk ${config.output} ${appFileBuffer.length}\x0d`); await waitFor("Ready", 1000); - port.write(appFile); - port.drain(); + port.write(appFileBuffer); + await new Promise(resolve => port.drain(resolve)); await waitFor(">: ", 1000); console.log("Launching application");