# HG changeset patch # User Eli Zaretskii # Date 1250936632 0 # Node ID 4f700f983ef98e1af03eaad66caa73f8dca70431 # Parent 232bd5c831d544cb7ff2e06a0e3f2d21da0eaa94 (encode_coding_string): Don't encode unibyte strings. (Bug#4047) diff -r 232bd5c831d5 -r 4f700f983ef9 src/coding.h --- a/src/coding.h Sat Aug 22 09:07:08 2009 +0000 +++ b/src/coding.h Sat Aug 22 10:23:52 2009 +0000 @@ -738,9 +738,10 @@ SBYTES (string), Qt) #define encode_coding_string(coding, string, nocopy) \ - (encode_coding_object (coding, string, 0, 0, SCHARS (string), \ - SBYTES (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) \