# HG changeset patch # User Richard M. Stallman # Date 1015185971 0 # Node ID 4bd6b6b21deb299d1c3d330ba05642b1c287f505 # Parent 771bbdee433b28b9b3a5803e53d7b4ffcdb22770 (read1): When reading from a file, default string to multibyte only if it has some multibyte characters. diff -r 771bbdee433b -r 4bd6b6b21deb src/lread.c --- a/src/lread.c Sun Mar 03 20:04:17 2002 +0000 +++ b/src/lread.c Sun Mar 03 20:06:11 2002 +0000 @@ -2260,9 +2260,11 @@ compiled Emacs Lisp files, and those always use the Emacs internal encoding. Meanwhile, Qlambda is used for reading dynamic byte code (compiled with - byte-compile-dynamic = t). */ + byte-compile-dynamic = t). So make the string multibyte + if the string contains any multibyte sequences. + (to_multibyte is a no-op if not.) */ to_multibyte (&p, &end, &nchars); - is_multibyte = 1; + is_multibyte = (p - read_buffer) != nchars; } else /* In all other cases, if we read these bytes as