Let $X$ be a compact Kähler manifold. The set $\cha(X)$ of one-dimensional complex valued characters of the fundamental group of $X$ forms an algebraic group. Consider the subset of $\cha(X)$ consisting of those characters for which the corresponding local system has nontrivial cohomology in a given degree $d$. This set is shown to be a union of finitely many components that are translates of algebraic subgroups of $\cha(X)$. When the degree $d$ equals 1, it is shown that some of these components are pullbacks of the character varieties of curves under holomorphic maps. As a corollary, it is shown that the number of equivalence classes (under a natural equivalence relation) of holomorphic maps, with connected fibers, of $X$ onto smooth curves of a fixed genus $>1$ is a topological invariant of $X$. In fact it depends only on the fundamental group of $X$.