Can a continuous preference be represented by a discountinuous function? I can think of some examples, but what can be an outline of the proof?
Indeed you are correct that a continuous utility function can be represented by a discontinuous function. However, I am not sure what you mean by proof beyond an example; an example is a proof of this fact. 

For completeness, here is an example we can take $\succeq\,\subset \mathbb R \times \mathbb R$ to reflect the usual ordering (i.e., $x \succeq y$ iff $x \geq y$). Clearly this is a continuous ordering as its contour sets are intervals. The utility function
$$ U(x) = \begin{cases}
x &amp;\text{ if } x &lt; 4 \\
x + 1 &amp;\text{ if } x \geq 4
\end{cases}
$$
is discontinuous, but represents $\succeq$. 

Any such function is necessarily have a continuous representation as well.