Function: decode-coding-string

decode-coding-string is a function defined in coding.c.

Signature

(decode-coding-string STRING CODING-SYSTEM &optional NOCOPY BUFFER)

Documentation

Decode STRING which is encoded in CODING-SYSTEM, and return the result.

Optional third arg NOCOPY non-nil means it is OK to return STRING itself if the decoding operation is trivial.

Optional fourth arg BUFFER non-nil means that the decoded text is inserted in that buffer after point (point does not move). In this case, the return value is the length of the decoded text. If that buffer is unibyte, it receives the individual bytes of the internal representation of the decoded text.

This function sets last-coding-system-used to the precise coding system used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
not fully specified.) The function does not change the match data.

View in manual

Probably introduced at or before Emacs version 23.1.

Source Code

// Defined in /usr/src/emacs/src/coding.c
{
  return code_convert_string (string, coding_system, buffer,
			      0, ! NILP (nocopy), 0);
}