rg3/youtube-dl — pull request #3855 by dstftw (2014-09-30 15:43:37+00:00)
Title: [core] Decode environment variables with filesystem encoding

This PR fixes the problem with non-ASCII characters in environment variables under python2 in windows (described in #3854 #2918 #3217) by introducing compat versions of `os.getenv` and `os.path.expanduser`.
`compat_getenv` decodes variables with filesystem encoding
`compat_expanduser` is a copypasted implementation from python 2.7 with env variable extraction via `compat_getenv`.