Open mluds opened 9 years ago
Thanks for reporting. There is indeed an issue with Unicode paths and command invocation on Windows. It appears to be impossible to pass Unicode-string arguments to command invocations in Python 2.x: http://bugs.python.org/issue1759845
I don't know a reliable way around this (specifically, I have not found a way to encode to bytestrings so that Windows recognizes the path). Hence this sad line in acoustid: https://github.com/sampsyo/pyacoustid/blob/master/acoustid.py#L285
Additional insight would of course be welcome!
It also looks like there might be some manner of terminal encoding issue in your shell (e.g., that first "blinkΓÇÉ182" in the output). Any Windows expertise for addressing that would be helpful.
Yep, it looks like since Python 2.x doesn't provide an interface to the CreateProcessW
function, there's no way to pass Unicode characters to a new Windows process without a C extension.
As for the ΓÇÉ
, it looks like it comes from the UTF-8 Hyphen bytes E2 80 90
when decoded as extended ASCII or cp437.
Thanks for looking into it. I think we're out of luck for now, sadly, although I'll leave this ticket open in case anyone finds something we're missing or for when we move to Python 3.
On the console output: it sounds like beets is outputting UTF-8 but cmd.exe (or the Windows terminal application? Not sure how this works) is interpreting it as ASCII. I also don't know how to fix this, since some people seem to have success with UTF-8 on Windows. Maybe they're using PowerShell?
Here's a workaround for python 2.7 on Windows to use CreateProcessW
. Comments welcome.
http://vaab.blog.kal.fr/2017/03/16/fixing-windows-python-2-7-unicode-issue-with-subprocesss-popen/
The convert plugin seems to have issues with certain characters. Here is the cmd.exe output when importing:
Everything works fine here but notice how the
-
becomesΓÇÉ
. Then when I try to convert one of the tracks:Notice how the
-
isΓÇÉ
in the ffmpeg command but‐
in the output. This makes me think it has something to do with character encoding andsubprocess.popen
.P.S. I only modified the source to display the ffmpeg output. Here's the
git diff
: