[ANN] get_iplayer 2.87 released

Nick get_iplayer at i.lucanops.net
Mon Oct 20 05:09:54 PDT 2014


On Mon, 20 Oct 2014 00:28:08 +0100
dinkypumpkin <dinkypumpkin at gmail.com> wrote:

> On 19/10/2014 23:40, Nick wrote:
> > Is this a problem of my doing?
> >
> > $ get_iplayer iggy -g
> > Malformed UTF-8 character (unexpected continuation byte 0xa9, with
> > no preceding start byte) at /home/nick/bin/get_iplayer line 10484.
> 
> It looks like the self-update mechanism mangles UTF-8 characters in
> the script. The line referenced is where a copyright symbol is
> inserted to prettify the MP4 metadata tag. Too clever for my own
> good, I guess. For now, download the 2.87 tarball and use the
> get_iplayer script in there.
> 

I did have a look at the line and it looks OK to me.... a non-perl
programmer :) The copyright symbol is there and visible in a text
editor (Leafpad)..... but looking at the file in a terminal with less
and the copyright symbol shows as <A9>, with inverted colours!

I have actually just commented out the whole line, it was easier: the
code was right there in Leafpad, or a manual swap of files. #, ctrl-s,
done :)

Before making a change though I tried get_iplayer in uxterm (got the
same byte message), though I am pretty sure my whole OS works properly
with UTF, the locale is all en-GB.utf8. I have recently used some
unicode characters in a bash script and didn't get errors or
inconsistent behaviour..... that gives me an idea:

$ file ../bin/phonebatt.sh 
../bin/phonebatt.sh: Bourne-Again shell script, UTF-8 Unicode text
executable
$ file ../bin/get_iplayer
../bin/get_iplayer: Perl script, ASCII text executable, with very long
lines

If my system is seeing g_ip as ASCII when it contains UTF characters
that might explain the original message. I wouldn't be surprised at all
though if this is my system, I know I don't really know what I am doing
with text encodings and stuff (I've had problems in the past, with media
metadata as it happens).

fx: hacking

Right, I've fixed it properly now, I think :) I've uncommented the line
so the perl script is stock, but then in Leafpad clicked file, save-as,
and changed the text encoding to be UTF8 (it was ISO 8859-15).
The file command still sees the get_iplayer script file as ASCII, so
I'm still a bit confused, but at least there isn't the malformed byte
message anymore:

$ get_iplayer -g
Malformed UTF-8 character (unexpected continuation byte 0xa9, with no
preceding start byte) at /home/internewt/bin/get_iplayer line 10484.
get_iplayer v2.87, Copyright (C) 2008-2010 Phil Lewis This program
comes with ABSOLUTELY NO WARRANTY; for details use --warranty. This is
free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

ERROR: Search term(s) required for recording
$ leafpad ../bin/get_iplayer
# /me changes text format
$ get_iplayer -g
get_iplayer v2.87, Copyright (C) 2008-2010 Phil Lewis
  This program comes with ABSOLUTELY NO WARRANTY; for details use
--warranty. This is free software, and you are welcome to redistribute
it under certain conditions; use --conditions for details.

ERROR: Search term(s) required for recording


No idea if this byte message is occurring for other people, or how much
it matters, but hopefully what I have said is useful.

Cheers
Nick



More information about the get_iplayer mailing list