You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been having some issues with emoji's and similar characters in filenames on my system. I usually search these out using a regex search for [^\x20-\x7E\n\t\r] so wanted to include that in the renamerOnUpdate script to remove.
Unfortunately, after numerous ways of trying to add it to the removecharac_Filename variable, I gave up and inserted it into the main renamerOnUpdate.py at line 942:
# Remove illegal character for Windows
new_filename = re.sub('[\\/:"*?<>|]+', "", new_filename)
new_filename = re.sub(r"[^\x20-\x7E\n\t\r]+", "", new_filename) # Remove non Ascii characters
There may be a cleaner/better way to do this, or to include it in the removecharac_Filename variable, but for now this was the simplest way I could think of.
It could be standardised by adding a removeNonAsciiTRUE/FALSE variable to the config that then embeds this rename in another if statement.
I'm unsure if the if MODULE_UNIDECODE and UNICODE_USE: at line 947 is meant to do this or something else. The warnings made me not try it.
The text was updated successfully, but these errors were encountered:
I have been having some issues with emoji's and similar characters in filenames on my system. I usually search these out using a regex search for
[^\x20-\x7E\n\t\r]
so wanted to include that in the renamerOnUpdate script to remove.Unfortunately, after numerous ways of trying to add it to the
removecharac_Filename
variable, I gave up and inserted it into the main renamerOnUpdate.py at line 942:There may be a cleaner/better way to do this, or to include it in the
removecharac_Filename
variable, but for now this was the simplest way I could think of.It could be standardised by adding a
removeNonAscii
TRUE/FALSE
variable to the config that then embeds this rename in another if statement.I'm unsure if the
if MODULE_UNIDECODE and UNICODE_USE:
at line 947 is meant to do this or something else. The warnings made me not try it.The text was updated successfully, but these errors were encountered: