From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: decode-coding-string and consing Date: Mon, 10 Feb 2003 22:53:39 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044914344 20786 80.91.224.249 (10 Feb 2003 21:59:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2003 21:59:04 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18iLx7-0005P5-00 for ; Mon, 10 Feb 2003 22:59:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18iLyc-0001au-00 for gnu-help-gnu-emacs@m.gmane.org; Mon, 10 Feb 2003 17:00:34 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6544 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6544 "Eli Zaretskii" writes: >> ,----[ C-h f decode-coding-string RET ] >> | decode-coding-string is a built-in function. >> | (decode-coding-string STRING CODING-SYSTEM &optional NOCOPY) >> | >> | Decode STRING which is encoded in CODING-SYSTEM, and return the result. >> | Optional arg NOCOPY non-nil means it is OK to return STRING itself >> | if the decoding operation is trivial. >> `---- >> >> Under what conditions is the decoding operation "trivial"? > > If CODING-SYSTEM is nil or such that no encoding is necessary at all. But I don't understand why any encoding is needed at all in: (decode-coding-string "abc" 'us-ascii t) The input string and the output string are identical. Why is it necessary to cons a new string here?