Continuous Function non-zero only on a given open set Given an arbitrary open set $U$ in a Hausdorff space $X$, is it possible to construct a continuous function $f:X\to \mathbb C$ such that $\{x\in X\mid f(x)\neq 0\} = U$? 
My intuition, mostly due to Urysohn's lemma (even though it is stated for locally compact Hausdorff spaces), seems to think so, though I am having quite a bit of trouble writing one down. If more assumptions need to be made, which ones should they be? Does Urysohn's lemma tell us that this is true for locally compact Hausdorff spaces?
 A: No, this is not always possible. Even if $X$ happens to be normal.
Note that the set $\mathbb{C} \setminus \{ 0 \} \subseteq \mathbb{C}$ may be represented as $\bigcup_{n \in \mathbb{N}} \{ z \in \mathbb{C} : |z| \geq \frac{1}{n} \}$. So in addition to being open, $\mathbb{C} \setminus \{ 0 \}$ is an Fσ-set. One can show that if $f : X \to Y$ is continuous (arbitrary spaces $X$ and $Y$), then $f^{-1} [ B ]$ is Fσ in $X$ whenever $B$ is Fσ in $Y$. So for any space $X$ and any continuous mapping $f : X \to \mathbb{C}$ the set $f^{-1} [ \mathbb{C} \setminus \{ 0 \} ]$ is an open Fσ subset of $X$.
A space $X$ in which every open subset is Fσ is sometimes called a perfect space, and a normal perfect space is called perfectly normal. Perfectly normal spaces have the property that for any open subset $U \subseteq X$ there is a continuous $f : X \to \mathbb{R}$ such that $f^{-1}[ \mathbb{R} \setminus \{ 0 \} ] = U$. (The same obviously holds for complex-valued continuous functions.)
And there are certainly examples of Hausdorff (even normal) spaces which are not perfect. One is the ordinal space $[0 , \omega_1 ] = \omega_1+1$. Here the interval $[0,\omega_1)$ is open, but is not Fσ. (Any closed subset which does not contain $\omega_1$ is countable, and the union of countably many countable sets is countable.) So there is no continuous function $f : [0,\omega_1] \to \mathbb{C}$ such that $[0,\omega_1) = f^{-1} [ \mathbb{C} \setminus \{ 0 \} ]$.
