Fragmentation function for charmed quarks from neutrino data