Replace Special characters on filename to create SPIFFS File

Hey Falks.

I need your help :smiley:

I wanna created empty files. My only aim is to store a Wifi password, into a file-name with SPIFFS.

It has to be saved as filename.. do not ask why. For example:

anywifipassword.passwd <-- anywifipassword is the Wifi password.

The problem is: what happens with special characters, for example:

example"filename.passwd <-- you see the special charackter ?
exampleอัอัfilename.passwd <--- here is a special letter from indonesia

What happens with other languages characters on file names ?
Is there a way to replace all special characters in english letters ? oder HTML-Code Letters ?

But I also have to translate it back, when I need the filename as String :smiley:

SPIFFS only allows 31 char filenames so you might not have a universal solution. You can always encode your filename like HTML does, but you may run into the 31 char limit.

It seems like your mysterious requirement may not work

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.