I am trying to set up a schedule task to download some files from YouTube. The download script works well when I am ssh'ing as a user. However, the download filenames are wrong when started by the system task. It seems to be a locale issue, as the download filename comes with some Chinese characters.
How can I config the system task to support utf-8 filenames?
Here is my current script:
#!/bin/sh
LANG="en_US.UTF-8"
URL='https://www.youtube.com/playlist?list=PLPY0_ooDN1du85pbM2mEaVRE-dS-fHtT3'
OUT='/var/services/download/video/%(upload_date)s-%(title)s.%(ext)s'
/var/services/homes/ohho/tool/youtube-dl --max-downloads 6 $URL -o $OUT