The optional argument preferred-coding-system specifies a coding
system to try first. If that one can handle the text in the specified
region, then it is used. If this argument is omitted, the current
buffer's value of buffer-file-coding-system
is tried first.
If the region contains some multibyte characters that the preferred coding system cannot encode, this function asks the user to choose from a list of coding systems which can encode the text, and returns the user's choice.
One other kludgy feature: if from is a string, the string is the target text, and to is ignored.
Here are two functions you can use to let the user specify a coding system, with completion. See section Completion.
Go to the first, previous, next, last section, table of contents.