Copy enough characters up to the encoding