C=1 conformal field theories on Riemann surfaces