I am trying to find a function $f:B \subset \Bbb R^n \rightarrow \Bbb R^m$ for $B$ a connected set that is continuous, one-to-one where $f^{-1} = f(B) \rightarrow B$ is discontinuous. The hint I have been given in my textbook is to choose $m>1$. I know that the image will be a connected set. The only idea I had is to send an angle to the unit circle $\theta \rightarrow (\cos(\theta),\sin(\theta)), \theta \in [0, 2\pi)$ and then take the inverse to be $f^{-1}:(x,y)\rightarrow (\arctan(y/x))$ but I feel that this function is continuous and not appropriate. Any hints appreciated.
I have seen a similar question here: Inverse function that takes connected set to non-connected set