Let $X$ be a Hausdorff space such that the irrationals $\mathbb P$ (in their usual topology) form a dense subspace of $X$.

Let $C$ be the Cantor set. The set of "non-endpoints" of $C$ is homeomorphic to $\mathbb P$.

**Question.** If $f:C\to X$ is a continuous surjection such that $f\restriction \mathbb P$ is the identity map, then is $X$ necessarily disconnected?

NOTE: I suppose we could ask the same question with $\mathbb P$ replaced with the rationals $\mathbb Q$ (identifying the endpoints of $C$ with $\mathbb Q$).

Interval exchange transformations). Here he doubles all points, but you can glue back all pairs of points outside a countable set of pairs. But again, you have a very natural examples: the map mapping a decimal expansion to the real it defines. It's almost injective, but there are countably manyt fibers of size two (e.g. $734999999\dots$ and $735000000\dots$ which are both mapped to the same real $0.735$), and it maps a Cantor set onto a segment. $\endgroup$ – YCor Nov 18 '17 at 23:35