get-iplayer / get_iplayer

A utility for downloading TV and radio programmes from BBC iPlayer and BBC Sounds
https://github.com/get-iplayer/get_iplayer/wiki
GNU General Public License v3.0
2.13k stars 229 forks source link

Error saving download due to character encoding error from curly quote in output directory name #432

Closed Coder007Bruce closed 10 months ago

Coder007Bruce commented 1 year ago

Do not file a bug report if you are using get_iplayer outside the UK. If you do, your report will be ignored.

Do not file a bug report if you are using get_iplayer with a VPN or proxy from any location, including the UK. If you do, your report will be ignored.

Search the repository (search field at top left) to see if a report already exists for the bug in the issue tracker. Do not create a duplicate report. Duplicate reports will be ignored.

Review recent open and closed entries in the issue tracker to see if a report already exists for the bug. Do not create a duplicate report. Duplicate reports will be ignored.

Ensure that you are using get_iplayer 3.31 or higher. If not, your report will be ignored.

Identify the operating system and version where get_iplayer demonstrates the bug

Windows 10

Provide a clear and concise description of the bug. Do not paste get_iplayer output or screenshots into the field below. If you do, your report will be ignored.

When trying to download "History's Biggest Fibs with Lucy Worsley" the response from the Windows PowerShell terminal is:-

ERROR: Cannot open (write): E:\BBC iPlayer\Royal Historys Biggest Fibs with Lucy Worsley\Royal_Historys_Biggest_Fibs_with_Lucy_Worsley_Series1-_01._The_Reformation_m000fj9c_editorial.video.ts

During the process of attempting to download the files, all of the 6 files in the recurrence show an error in the title name as follows:- "Royal History’s Biggest Fibs with Lucy Worsley" when is should read "Royal History's Biggest Fibs with Lucy Worsley".

It seems to be wrongly translating the apostrophy to ’ which, I think is causing the problem. Downloading the file via BBC iplayer works okay leading to believe its not a problem on the BBC server,

Provide the PID or URL of the programme you are attempting to download, if applicable. Provide the PID or URL for only one programme.

PID=m000fj9c

Provide the complete get_iplayer command line that demonstrates the bug. Do not truncate or excerpt the command. If you do, your report will be ignored. If you are using the Web PVR, list the steps necessary to reproduce the bug, in as much detail as possible.

get_iplayer --pid=m000fj9f --pid-recursive --output="E:\BBC iPlayer\Royal History's Biggest Fibs with Lucy Worsley"

Drag the log file into the field below to create an attachment. The log file must be added as an attachment. Do not paste its contents into the field below. If you do, your report will be ignored. You may enter a URL linking to your log file on a pastebin site. If the bug prevents get_iplayer from running, enter "N/A" in the field below. If you enter any other text in the field below, your report will be ignored.

Verbose070523.txt

If you are using the Web PVR, provide your web browser name and version. This information typically can be found from the application menu via Chrome/Firefox/Safari->About... (macOS) or Help->About... (Linux/Windows)

No response

notnac commented 1 year ago

This is something of an edge case triggered by inclusion of a curly quote in the value of --output. This is related to limitations of Perl on Windows. Will reopen this issue for now, but we are undecided on whether a fix is worth the effort. Avoid the problem by not using curly quotes. A better solution is to let get_iplayer do the work so that directory and file names are generated consistently:

get_iplayer --pid=m000fj9f --pid-recursive --output="E:\BBC iPlayer" --subdir