unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74922: 29.4; copy_string_contents doesn't always produce a valid utf-8
@ 2024-12-17  6:08 Evgeny Kurnevsky
  2024-12-17 13:18 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Evgeny Kurnevsky @ 2024-12-17  6:08 UTC (permalink / raw)
  To: 74922

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

According to the docs and comment inside module_copy_string_contents it
should always produce a valid utf-8 string that can be used in dynamic
modules, but it seems it's not always the case. I encountered an emacs
crash when using emacs-module-rs because it always expects a valid utf-8
for strings. To reproduce you can call:

(some-function-from-dynamic-library (encode-coding-string (f-read-text
"wg-private-pc.age") 'utf-8 t))

The file is
https://github.com/kurnevsky/nixfiles/raw/0b3de016dac551398627a55788b80d4809afcbf9/secrets/wg-private-pc.age

See https://github.com/ubolonton/emacs-module-rs/issues/58 for additional
details.

[-- Attachment #2: Type: text/html, Size: 956 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-17 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17  6:08 bug#74922: 29.4; copy_string_contents doesn't always produce a valid utf-8 Evgeny Kurnevsky
2024-12-17 13:18 ` Eli Zaretskii
     [not found]   ` <CAOEHfojGKXoUKbf1-5N=973OURs==BQTXejLFd8cLhsR1DWh+g@mail.gmail.com>
2024-12-17 13:31     ` bug#74922: Fwd: " Evgeny Kurnevsky
2024-12-17 14:24       ` Eli Zaretskii
2024-12-17 14:46         ` Evgeny Kurnevsky
2024-12-17 15:10           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).