  Starting from an arbitrary cluster-tilting object $T$ in a 2-Calabi--Yau
category over an algebraically closed field, as in the setting of Keller and
Reiten, we define, for each object $L$, a fraction $X(T,L)$ using a formula
proposed by Caldero and Keller. We show that the map taking $L$ to $X(T,L)$ is
a cluster character, i.e. that it satisfies a certain multiplication formula.
We deduce that it induces a bijection, in the finite and the acyclic case,
between the indecomposable rigid objects of the cluster category and the
cluster variables, which confirms a conjecture of Caldero and Keller.
