+2009-08-22 Eli Zaretskii <eliz@gnu.org>
+
+ * coding.h (encode_coding_string): Don't encode unibyte strings.
+ (Bug#4047)
+
2009-07-29 Chong Yidong <cyd@stupidchicken.com>
* Version 23.1 released.
STRING_BYTES (XSTRING (string)), Qt)
#define encode_coding_string(coding, string, nocopy) \
- (encode_coding_object (coding, string, 0, 0, XSTRING (string)->size, \
- STRING_BYTES (XSTRING (string)), Qt), \
- (coding)->dst_object)
-
+ (STRING_MULTIBYTE(string) ? \
+ (encode_coding_object (coding, string, 0, 0, SCHARS (string), \
+ SBYTES (string), Qt), \
+ (coding)->dst_object) : (string))
#define decode_coding_c_string(coding, src, bytes, dst_object) \
do { \