From: Mattias EngdegÄrd Date: Fri, 30 Sep 2022 12:09:47 +0000 (+0200) Subject: Rectify string= documentation X-Git-Tag: emacs-29.0.90~1856^2~120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16015288e1d89d6c8e9fd98ac19f32c1290759b7;p=emacs.git Rectify string= documentation * doc/lispref/strings.texi (Text Comparison): Describe the current behaviour since about 20 years back. --- 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