Q:

encoding problem with \verbatiminput : Package inputenc Error: Unicode char \u8: not set up for use with LaTeX

I'm trying to import some logs files using \verbatiminput to do a automatic report from our logs.  I got some encoding problem. 
My objective: import some logs files with various special char (included hidden one) as verbatim. 

I believed the file to be in ISO-8859-1. ( the server OS is windows)
I got a LOT of file.  So the usual solution "rewrite it"/"look for the faulty char" is not an option. 
I run pdflatex from a mac osx. 
I converted the files with (notice the -c option to drop faulty char)

. 
for file in ./test*/*.txt
do
  iconv -c -f ISO-8859-1 -t utf8 $file  > $file.n1
  mv -f $file.n1 $file 
done

My tex header:
\usepackage{verbatim}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

error message I got :
!  Package inputenc Error: Unicode char \u8:° not set up for use with LaTeX.

To solve the "degree" problem, I added 
cat $file.n1 | tr '°' 'º' > $file.n2

then I got an other error on an other file, this time with an invisible char. 
!  Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.

I first tried to not convert the file and import them as T1/latin1 or LY1/ascinew, but I got the error
!  Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `latin1'. 

on different files. 
My question:

Is there  a way to ignore/replace ALL the faulty char?  
from LaTeX ?  from the shell ?  
using "tr" or "iconv" ? 
Am I doing something wrong when importing the files / doing the conversion? 
with which encoding will I have less problem ? 

any help is welcome, as I am blocked on this since two days. 
PS: My problem is not with the degree symbole in particular, but with unicode char that LaTeX cannot printout. 

A:

Yes you can replace the faulty char. 
You could replace ° with \ensuremath{^\circ}
or add to your latex header:
\newcommand{\degree}{\ensuremath{^\circ}}
\DeclareUnicodeCharacter{B0}{\degree}

Or you could use xelatex then there is no need for \usepackage[utf8]{inputenc} because it has full utf8 support build in. 
The encoding is all right Latex just doesn't know what to do with the unicode symbol :D

A:

The character ° is actually not included in the definitions make by the utf8 module for inputenc. 
\usepackage{textcomp} % for \textdegree
\usepackage{newunicodechar} % for \newunicodechar
\newunicodechar{°}{\textdegree}

Alternatively, you can resort to a "hand made symbol"
\newunicodechar{°}{\ensuremath{{}^\circ}}

that will work both in text and math mode (and textcomp is not needed). 
The advantage of newunicodechar is that it doesn't require knowing the Unicode point of the character we want to define a command for. 
Of course the "degree" case is an example: you can add all the characters you need. 
However, if your files are Latin-1 encoded (ISO 8859-1), you can try switching to this encoding before inputting them:
\usepackage[latin1,utf8]{inputenc} % utf8 is default
\newcommand{\latinoneverbatiminput}{%
  \begingroup\inputencoding{latin1}\verbatiminput{#1}\endgroup}

Then \latinoneverbatiminput{file} will use Latin-1 for file.