GNU bug report logs -
#43598
replace-in-string: finishing touches
Previous Next
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> That is, we could just say "the results are undefined if the strings
> contain raw bytes". Well, rather, if both strings are raw bytes, or
> none of them are, then it's well-defined, but not otherwise.
Or... OK, I've never actually looked at the strings this closely, I've
just used the various accessors which hide all the complexity.
So: "a\377ø" is a multibyte string with five bytes (the "raw byte" is in
the private plane).
"a\377a" is a unibyte string with three bytes.
So searching for "\377" (one-byte unibyte string) and (make-string 1
255) (two-byte multibyte string) should be well-defined in either
combination here?
"\377" is in both "a\377ø" and "a\377a".
(make-string 1 255) is in neither "a\377ø", nor "a\377a".
And:
(eq (elt (make-string 1 255) 0) (elt "\377" 0))
=> t
But, like, whatevs.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.