Variable: select-safe-coding-system-function

Function to call to select safe coding system for encoding a text.

If set, this function is called to force a user to select a proper
coding system which can encode the text in the case that a default
coding system used in each operation can't encode the text. The
function should take care that the buffer is not modified while
the coding system is being selected.

The default value is `select-safe-coding-system' (which see).