TITLE: How complicated can the path component of a compact metric space be?
QUESTION [6 upvotes]: Let $X$ be a compact metric space and $P$ be a path component of $X$. Since we are not assuming $X$ is locally path connected, $P$ must need not be open nor closed. Certainly, $P$ must be separable but how bad can $P$ be? Is every separable path-connected metric space, homeomorphic to the path component of some compact metric space?
I'm curious about this question because subspaces like $w(Y)=\{x\in X\mid \text{$X$ is not semilocally simply connected at $x$}\}$ are important homotopy-invariants in the study of Peano continua. If $Y$ is compact and locally path-connected, $X=w(Y)$ may be any compact metric space. Iteration of $w(-)$ becomes relevant. By this, I mean take a path component $P$ of $X$ and then take $w(P)$. This is why I want to know how bad $P$ can be. However, I don't know much about metric compactifications that would be relevant.

REPLY [4 votes]: Not every path connected separable metric space is homeomorphic to a path component of a compact metric space. The following cardinality arguments can be used:
Fact 1. There is up to homeomorphism more than $|\mathbb R|$-many path-connected separable metric spaces:
Just consider all the subspaces of the form $X_A=(\mathbb R\times (0,1))\cup (A\times\{0\})$ for $A\subseteq \mathbb R$. Each of them is path-connected and every space $X_A$ is homeomorphic to at most $|\mathbb R|$-many spaces $X_B$.
Fact 2. There is up to homeomorphism only $|\mathbb R|$-many analytic subsets of compact metric spaces.
Fact 3. Every path-connected component of a compact metric space is analytic.
Hence there is at least one path connected space of the form $X_A$ which is not homeomorphic to a path component of a compact metric space.