On 2023-02-17, Ihor Radchenko wrote: > Jens Lechtenboerger writes: >> Also, when I call secure-hash on the literal buffer-string, no >> problem arises. > > Org is calling secure-hash on buffer. Calling on buffer-string would > require unnecessary memory allocation to create the string. I can call secure-hash on the buffer with literally inserted contents without problems. >> It is not obvious that Org tries to write something here and why >> that fails now > > Org is not trying to write something. In you example, Org is just trying > to calculate buffer string hash - nothing wrong on Org side. "Something > wrong with encoding" way my guess. If you think that your case should be > perfectly fine, I recommend asking Emacs devs by filing a bug report to > them. Thank you for the clarifications. Probably I have to do that. For the record, if I insert "Lechtenb\303\266rger" as string into a buffer, secure-hash asks for a decoding. If I insert that literally via an UTF-8 encoded file, secure-hash works. Best wishes Jens