Running the command with youtube-dl directly in CMD works as expected:
youtube-dl -e "https://www.youtube.com/watch?v=E_JXrNAxGzM"
It correctly gives the title of the Youtube video: 27/12/2016 晚間新聞 楊家駿直播睇手機
However if I use the same command within a Windows batch file using a FOR loop, the non ASCII characters are removed completely. The batch file code:
@ECHO OFF
FOR /F "delims=" %%i IN ('youtube-dl -e "https://www.youtube.com/watch?v=E_JXrNAxGzM"') DO (
ECHO %%i
)
PAUSE
EXIT
Only gives this result: 27/12/2016
As a test, I tried this:
set var=晚間新聞楊家駿直播睇手機
for %%i in (%var%) do (
echo %%i
)
Which works fine and echos the Chinese characters correctly, this leads me to believe it's not a Unicode problem in CMD, but somehow tied with youtube-dl.
However, I have been assured that it's not a youtube-dl problem.
Is there something I'm missing and any way to get this working?