Comet C/2002 X5 (Kudo-Fujikawa) was observed near its perihelion of 0.19 astronomical unit by the Ultraviolet Coronagraph Spectrometer aboard the Solar and Heliospheric Observatory spacecraft. Images of the comet reconstructed from high-resolution spectra reveal a quasi-spherical cloud of neutral hydrogen and a variable tail of C and C that disconnects from the comet and subsequently regenerates. The high abundance of C and C, at least 24% relative to water, cannot be explained by photodissociation of carbon monoxide and is instead attributed to the evaporation and subsequent photoionization of atomic carbon from organic refractory compounds present in the cometary dust grains. This result serves to strengthen the connection between comets and the material from which the Solar System formed.