What special characters are allowed for file names on Android?
~!@#$%^&*()_+/\.,
Also, can I save file with Unicode name?
Characters that are valid for naming files, folders, or shortcuts include any combination of letters (A-Z) and numbers (0-9), plus the following special characters: ^ Accent circumflex (caret) & Ampersand. ' Apostrophe (single quotation mark)
According to wiki and assuming that you are using external data storage which has FAT32.
Allowable characters in directory entries
are
Any byte except for values 0-31, 127 (DEL) and: " * / : < > ? \ | + , . ; = [] (lowcase a-z are stored as A-Z). With VFAT LFN any Unicode except NUL
On Android (at least by default) the file names encoded as UTF-8.
Looks like reserved file name characters depend on filesystem mounted (http://en.wikipedia.org/wiki/Filename).
I considered as reserved:
private static final String ReservedChars = "|\\?*<\":>+[]/'";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With