TITLE: Topological spaces that resemble the space of irrationals
QUESTION [11 upvotes]: (This question actually arose in some research on number theory.)
I once learned that any countable dense subspace of any Euclidean space $\mathbb R^n$ is homeomorphic to the rationals $\mathbb Q$.
Now I wonder if something similar is true for the irrationals $J \mathrel{:=} \mathbb R \setminus \mathbb Q$ (with the subspace topology from $\mathbb R$).
Let $\mathfrak c$ denote the cardinality of the continuum.

I.    Is each cartesian power $J^n$ homeomorphic to $J$?

Also, how far can this be pushed?

II.   Let $X$ be a dense totally disconnected subspace of $\mathfrak R$ such that every neighborhood of each point of $X$ contains $\mathfrak c$ points.  Is $X$ homeomorphic to $J$?

What about for such subspaces of fairly nice subspaces of $\mathbb R^n$?

IIa.  Let $X$ be any subspace of $\mathbb R^n$ as described in II., and let $B$ denote any subspace of $\mathbb R^n$ homeomorphic to [the open unit ball in $\mathbb R^n$ $\cup$ any subset of its boundary].   Then is $X \cap B$ homeomorphic to $J$?

And what about greater generality?

III.  Is there a simple set of conditions that describe exactly all spaces (or subspaces of $\mathbb R^n$) that are homeomorphic to $J$?  What about $J^n$? (Perhaps the word homogeneous or metric needs to be included.)

(I found nothing relevant via Google, in MathSciNet, or here on MathOverflow.)

REPLY [2 votes]: Several answers point out the following:

The space of irrationals is homeomorphic to the Baire space $\mathbb N^{\mathbb N}$ of functions from $\mathbb N$ to $\mathbb N$.

No one gave an explicit homeomorphism. [PS: It's now pointed out that the answer by Richard Borcherds did so, if very tersely. I skimmed too fast.]
Let $a_1,a_2,a_3,\ldots$ be a sequence of positive integers. Then
$$
a_1 + \cfrac 1 {a_2 + \cfrac 1 {a_3 + \cfrac 1 {a_4 +\ddots}}} \in \mathbb R \smallsetminus\mathbb Q.
$$
This number cannot be rational since an expansion of a rational number in this way must terminate because of well-ordering of $\mathbb N.$
That gives you the positive irrationals. To see that that is homeomorphic to the space of all irrationals, recall a fact proved by Georg Cantor: any two countable densely linearly ordered sets without endpoints are order-isomorphic to each other. ("Densely" means only that between any two elements there is another (so no knowledge of topology is needed to understand that word).) And an order isomorphism of those two sets of rationals will give you an order isomorphism of those two sets of irrationals.