Skip to content

Commit

Permalink
uk_freeview: remove invalid control codes (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
honir committed Sep 12, 2024
1 parent f84e2eb commit 5007d40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions grab/uk_freeview/tv_grab_uk_freeview
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,11 @@ sub fix_utf8( $ ) {
$_[0] =~ s/\x{2039}/\xE2\x80\x98/og; # open single quote
$_[0] =~ s/\x{203a}/\xE2\x80\x99/og; # close single quote

# invalid control codes
$_[0] =~ s/\x{0019}/\x27/og; # apostrophe (#239 dodgy character in AlJazeera data - "Greece\u0019s state-owned broadcaster")
$_[0] =~ s/\x{0018}\x{0018}/\x22/og; # (#244 dodgy character in Newsmax data - "\u0018\u0018Prime News\u0022 delivers comprehensive")
$_[0] =~ s/\x{0018}/\x20/og; # (#244 -- ditto --)
$_[0] =~ s/\x{001C}//og; # (#244)

return $_[0];
}
Expand Down

0 comments on commit 5007d40

Please sign in to comment.