File Upload: Replace Spaces option converts UTF8 to ASCII

Wappler Version : 6.0.0 Beta 16
Operating System : Win 11
Server Model: NodeJS
Database Type: PostgreSQL
Hosting Type: Local

Problem description

Using option “File Upload” component in server connect with “Replaces spaces” option checked transform UTF8 chars to unreadable chars.

Actual behavior

Actually pretty sure that data formats filter “underscore string” does the same behavior.
Example : représentation becomes reprA©sentation

Steps to reproduce

  1. Tick Replace Spaces option under file upload prop
  2. Check the uploaded file with space e.g “file représentantion.pdf” is renamed to “file_reprA©sentation.pdf”
  3. Inside the code, “replaceSpace”: true
  4. XHR/chrome debug : UTF-8 = confirmed

Just a quick bump. Still stuck on this one, i tried a lot of options :sweat_smile:

Does it work correctly if you do not have the Replace Spaces option checked? The option does only a simple regexp replace which should not affect any UTF8 characters.

@patrick nope. Tried every options with the “File Upload” action but still getting same result. I eventually uploaded the upload.js to chatgpt and asked it questions about possible issues with UTF8 characters like é,à,è,ô,etc… and it seems to be finding issues with (await file.mv(filepath);) and (parseTemplate).

I can confirm that the error is not from a process after the upload (database insert, s3 upload, etc), its once it hits “File Upload” server action that the name changes.

Thanks for your help, it really stops my development right now.

Soooo… Is it possible to get a confirmation that its a bug or not? Can’t say if problem is only on my side, I would just need a little guidance. Thanks

Please test the following update, I was able to replicate the encoding problem but it was not related to the replace spaces option.

Please test if the following update helps: upload.zip (780 Bytes) Unzip to lib/setup.

1 Like

Working :slight_smile: thanks a lot, really!

Fixed in Wappler 6.1.3

2 Likes