olilarkin / wdl-ol

Enhanced version of Cockos' iPlug - A simple-to-use C++ framework for developing cross platform audio plugins and targeting multiple plugin APIs with the same code. VST / VST3 / Audiounit / RTAS / AAX (Native) formats supported. NOTE: THIS IS OBSOLETE, PLEASE SEE IPLUG2:
https://github.com/iplug2
936 stars 187 forks source link

hitting "codec can't decode byte" errors in duplicate script #78

Open Pomax opened 6 years ago

Pomax commented 6 years ago

I'm trying to use the duplicate.py script on Windows 10 to perform a plugin duplication, and while this runs fine for the most part, it hits a point where things go horribly wrong because the duplicate script has not been told which encoding to use for files, so it's just going on "whatever the OS is doing", which in Windows is traditionally cp1252, causing problems if the file input is assumed utf8.

Would it be possible to update the duplicate.py script so that it explicitly tells python how to de/encode files?

Pomax commented 6 years ago

Note that the use of fileinput.input might need to be switched over due to fileinput's inability to specify both an encoding and perform in-place changes: https://stackoverflow.com/questions/25203040/fileinput-inplace-filtering-encoding

olilarkin commented 6 years ago

will check it out