Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

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

Open
Pomax opened this issue Dec 4, 2017 · 2 comments
Open

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

Pomax opened this issue Dec 4, 2017 · 2 comments

Comments

@Pomax
Copy link

Pomax commented Dec 4, 2017

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
Copy link
Author

Pomax commented Dec 4, 2017

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
Copy link
Owner

will check it out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants