surrim / vlc-delete

VLC extension to remove videos from the harddisk
GNU General Public License v3.0
88 stars 14 forks source link

Video not deleted if file name contains an emoji (windows) #5

Open Jonas1312 opened 3 years ago

Jonas1312 commented 3 years ago

Hi,

The extension does not work if the file name contains an emoji (testtest ❤️.mp4 for example).

lua info: [vlc-delete] removing: C:/Users/Jonas/Desktop/testtest ❤️.mp4
lua info: [vlc-delete] windows detected
lua info: [vlc-delete] before string.gsub: C:/Users/Jonas/Desktop/testtest ❤️.mp4
lua info: [vlc-delete] after string.gsub: C:\Users\Jonas\Desktop\testtest ❤️.mp4
main info: playlist is empty
lua info: [vlc-delete] error: File does not exist

fileExists("\"" .. file .. "\"") fails to detect the file, but I don't know why...

Thanks

surrim commented 3 years ago

Thanks for this issue. Probability Windows needs another charset to handle ❤️ in file names. I can't reconstruct or fix at the moment, but if you know any LuaScript expert, let him/her know 😉

surrim commented 1 year ago

It's probably the best to wait for Lua 5.3 support ("VLC uses Lua 5.1"). See Lua: how to make os.rename & os.remove work with filenames containing unicode characters?