Subject: bug#53916: 29.0.50; pgtk: Gtk-WARNING with popup menu

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Feb 2022 09:59:41 +0200

> Cc: Stephen Berman <[email-masked]>, [email-masked]
> Date: Fri, 11 Feb 2022 14:26:21 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Po Lu <[email-masked]> writes:
> 
> > Great, does anyone know what "%s" parameters to `add_to_log' are
> > expected in?  UTF-8?
> 
> About 5 seconds after sending this, I realized that it accepts Lisp
> objects and format control strings like `format'.

Yes, the arguments are Lisp strings.

> So hopefully that means it will be okay to print out unibyte strings via
> that mechanism, since I don't want to go down the rabbit hole of what
> text encodings various libraries using the GLib logging system subject
> it to.

Just use DECODE_SYSTEM, the encoding is already figured out for you.

Please do NOT use the original unibyte strings, they are likely to
display as gibberish in some cases.