Initialize codecvt explicitly with the C locale, which might not be 0.