Problem: Let $G$ be an open subset of $\mathbb{R}$. Show that $\chi_G$ is continuous on $G\cup(\mathbb{R}\backslash\overline{G})$. Consequently, $\chi_G$ is continuous a.e. on $\mathbb{R}$.
My Attempt: Let $\epsilon>0$. There is a $\delta>0$ such that for every $x, y\in G$, $|x-y|<\delta$, then $|\chi_G(x)-\chi_G(y)|=|1-1|=0>\epsilon$. Hence $\chi_G$ is continuous on $G$.
Also, $\mathbb{R}\backslash \overline{G}$ is open, so for every $x,y\in\mathbb{R}\backslash \overline{G}$ and $|x- y|<\delta$ then $|\chi_G(x)-\chi_G(y)|=|0-0|=0>\epsilon$. Thus $\chi_G$ is continuous on $\mathbb{R}\backslash \overline{G}$.
But how will I show that $\chi_G$ is continuous on the union? Also continuity a.e. on $\mathbb{R}$?
The function $\chi_G$ need not be continuous a.e. on $\mathbb R.$ To see this, choose an open $G$ that contains the rationals with $m(G) < 1.$ Then $\chi_G$ is discontinuous at each point of $\mathbb R \setminus G,$ which is a set of infinite measure.