Linar - 2015-06-05

Hi! I need to change encoding of some files to UTF-8 via Notepad++. I found this script for Python Script plugin which changes encoding of all files in the folder:

import os;
import sys;
filePathSrc="C:\\Users\\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
    for fn in files: 
        if fn[-4:] == '.txt': # Specify type of the files
            notepad.open(root + "\\" + fn)      
            notepad.runMenuCommand("Encoding", "Convert to UTF-8")
            notepad.save()
            notepad.close()

It works good for me, except cases when files in the foler have unusual non-english character in the filename (like é, Ø, ß etc). When it comes to this files Notepad++ shows proposal to create new file "C:\Somefile.txt doesn't exist. Create it?" instead of open it.

Plese help to teach Notepad++ and this script open this files too.

P.S. I found advice on Notepad++ forum to set encoding of file path itself to UTF-8, but I'm not familiar with programming and don't know how to modify this particular script like this.