  Our aim is to determine the isotopic ratios {$^{12}$C/$^{13}$C}{} and
{$^{14}$N/$^{15}$N}{} in a variety of comets and link these measurements to the
formation and evolution of the solar system. The {$^{12}$C/$^{13}$C}{} and
{$^{14}$N/$^{15}$N}{} isotopic ratios are measured {for} the CN radical by
means of high-resolution optical spectra of the R branch of the B-X (0,0)
violet band. {23 comets from different dynamical classes} have been observed,
sometimes at various heliocentric {and nucleocentric} distances, in order to
estimate possible variations of the isotopic ratios in parent molecules. The
{$^{12}$C/$^{13}$C}{} and {$^{14}$N/$^{15}$N}{} isotopic ratios in CN are
remarkably constant (average values of, respectively, $91.0\pm3.6$ and
$147.8\pm5.7$) within our measurement errors, for all comets whatever their
origin or heliocentric distance. While the carbon isotopic ratio does agree
with the terrestrial value (89), the nitrogen ratio is a factor of two lower
than the terrestrial value (272), indicating a fractionation in the early solar
system, or in the protosolar nebula, common to all the comets of our sample.
This points towards a common origin of the comets independently of their
birthplaces, and a relationship between HCN and CN.
