[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: decode-coding-string and consing
From: |
Jesper Harder |
Subject: |
Re: decode-coding-string and consing |
Date: |
Mon, 10 Feb 2003 22:53:39 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 |
"Eli Zaretskii" <eliz@is.elta.co.il> 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?