From 16015288e1d89d6c8e9fd98ac19f32c1290759b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 30 Sep 2022 14:09:47 +0200 Subject: [PATCH] Rectify string= documentation * doc/lispref/strings.texi (Text Comparison): Describe the current behaviour since about 20 years back. --- doc/lispref/strings.texi | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index ba247a3edae..cf961e9e7c8 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -539,21 +539,10 @@ string or symbol, @code{string=} signals an error. @result{} nil @end example -For technical reasons, a unibyte and a multibyte string are -@code{equal} if and only if they contain the same sequence of -character codes and all these codes are either in the range 0 through -127 (@acronym{ASCII}) or 160 through 255 (@code{eight-bit-graphic}). -However, when a unibyte string is converted to a multibyte string, all -characters with codes in the range 160 through 255 are converted to -characters with higher codes, whereas @acronym{ASCII} characters -remain unchanged. Thus, a unibyte string and its conversion to -multibyte are only @code{equal} if the string is all @acronym{ASCII}. -Character codes 160 through 255 are not entirely proper in multibyte -text, even though they can occur. As a consequence, the situation -where a unibyte and a multibyte string are @code{equal} without both -being all @acronym{ASCII} is a technical oddity that very few Emacs -Lisp programmers ever get confronted with. @xref{Text -Representations}. +A unibyte and a multibyte string are equal in the sense of +@code{string=} if and only if they contain the same sequence of +character codes all being in the range 0--127 (@acronym{ASCII}). +@xref{Text Representations}. @end defun @defun string-equal string1 string2 -- 2.39.2