Riemann-Hilbert correspondence for curves