[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 0d7d09b: Test for error with multibyte strings in bindat.el
From: |
Stefan Kangas |
Subject: |
Re: master 0d7d09b: Test for error with multibyte strings in bindat.el |
Date: |
Thu, 22 Oct 2020 09:10:09 -0700 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> + (should-error (bindat-pack nil nil (encode-coding-string "ö" 'utf-8))))
>
> I don't understand this code: "ö" is a multibyte string,
> i.e. a sequence of chars (and not a sequence of bytes), so you can
> "encode" it to a sequence of bytes but "decoding" it makes no sense
> (and should ideally signal an error, tho I think we currently refrain
> from doing so).
Ugh, sorry about that. I guess the fix is to just change this to:
(should-error (bindat-pack nil nil "ö"))
Correct?