Function: ctext-pre-write-conversion

Encode characters between FROM and TO as Compound Text w/Extended Segments.

If FROM is a string, generate a new temp buffer, insert the text,
and convert it in the temporary buffer. Otherwise, convert in-place.