When I used listings package to import C# code snippet from within my LaTeX file, I got an output as follows.

At the first line, there is an unnecessary white space because of the BOM (Byte Order Mark) that is intentionally added by Microsoft (R) Visual Studio.
I really want to remove it from the output rather than from the C# file, how to do that?
Here is my LaTeX code:
\documentclass{article}
\usepackage{listings,xcolor}
\lstset{%
language={[Sharp]C},
backgroundcolor=\color{yellow!20},
basicstyle=\tiny,
keywordstyle=\color{blue},
identifierstyle=\color{magenta},
breaklines=true}
\begin{document}
\lstinputlisting{Program.cs}
\end{document}
utf8xencoding and/orextendedcharsoption, this issue disappears if you use TeXLive. – kiss my armpit Mar 13 '12 at 04:30