Ubuntu – Python opening files with utf-8 file names
In my code I used something like file = open(path +'/'+filename, 'wb') to write the file but in my attempt to support non-ascii filenames, I encode it as such naming = path+'/'+filename file = open(naming.encode('utf-8', 'surrogateescape'), 'wb') write binary data...…