Let $X$ and $Y$ be simply connected open regions of $\mathbb{C}$, and let $Z \subset X$ be a Cantor set. Assume we have a homeomorphism $f$ from $X$ to $Y$, which is holomorphic on $X \setminus Z$. Is $f$ necessarily holomorphic on $X$?
This belongs to the subject of holomorphic removability. See this Wiki article for more references. In particular, the article implies that any set with Hausdorff dimension smaller than $1$ is holomorphically removable, and if its Hausdroff dimension is greater than $1,$ it is not. If it is equal to $1,$ you remain puzzled. 


Yes, if the Cantor set has measure zero. This is a consequence of the Measurable Riemann Mapping Theorem which guarantees that the map is quasiconformal, combined with the theorem that if a quasiconformal map is conformal almost everywhere then it is conformal. 


Yes, if $Z$ has Hausdorff 1dimensional measure $0$. Then for any $\epsilon > 0$ you can cover $Z$ by a finite number of disks the sum of whose circumferences is less than $\epsilon$. The integral of $f$ over the boundary of the union of these disks is bounded by a constant times $\epsilon$. Use this together with Morera's theorem. 


Yes, if $H_1(E)=0$. For every $1< t\leq 2$ there are examples of Cantor sets of Hausdorff dimension $t$ which are nonremovable. Of course there are also examples of $t$dimensional sets which are removable (e.g. quasicircles). Complete characterization of removable sets is an interesting and open problem. 


In Theorem 3 of this paper, for every $\alpha>1$, Chris Bishop constructs examples of Cantor sets $E\subset {\mathbb C}$ whose Hausdorff dimension is in the interval $(1, \alpha)$ and homeomorphisms $f: {\mathbb C}\to {\mathbb C}$ which are conformal outside of $E$, but are not conformal on $E$. Furthermore, in his examples, the set $f(E)$ has zero Lebesgue measure. 


Removability with respect to homeomorphisms is different from the removability with respect to bounded functions mentioned in another answer. In particular, it is not necessary to have Hausdorff dimension at most 1. Indeed, any quasicircle is removable with respect to homeomorphisms, as mentioned by Hrant. For much more complicated sets, see Jeremy Kahn's thesis "Holomorphic Removability of Julia sets": He shows that many Julia sets of quadratic polynomials are in fact removable. http://arxiv.org/abs/math/9812164 (As above, we consider the set in question to be compact.) In particular, he discusses the notion of "absolute area zero": A set $K$ has absolute area zero if there is no conformal isomorphism from the complement of $K$ to the complement of some set with positive area. Any such set is removable, and any Cantor set that is wellsurrounded has absolute area zero. On the other hand, as has been noted elsewhere, there are many examples of sets that are not holomorphically removable. The simplest example of a Cantor set would be a Cantor set of positive measure. More interesting examples are provided by Chris Bishop, as cited in Misha's answer. EDIT: You may also wish to look at the paper "Removability theorems for Sobolev functions and quasiconformal maps" by Peter Jones and Stas Smirnov, which contains a number of sufficient conditions for conformal removability: http://www.unige.ch/~smirnov/papers/hrj.pdf Graczyk and Smirnov use these criteria to prove removability of a large class of Julia sets. 

