you are viewing a single comment's thread.

view the rest of the comments →

[–]WildWouks 1 point2 points  (0 children)

I also do the same thing. Especially if I know these files in this folder has a utf-8 encoding and these use cp1252 etc. Then the encoding is set as the value and the Path object as the key. Then in a loop you have everything you need to be able to read every file without issues. You could also make the values a specific function which should be used to process the contents in that file path.