On the cohomology of curves in P^N