bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51716: 29.0.50; [PATCH] Expose xwidget navigation history to Lisp co


From: Eli Zaretskii
Subject: bug#51716: 29.0.50; [PATCH] Expose xwidget navigation history to Lisp code
Date: Sat, 13 Nov 2021 17:02:13 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: 51716@debbugs.gnu.org
> Date: Thu, 11 Nov 2021 09:03:19 +0800
> 
> >> +  if (item)
> >> +    {
> >> +      item_title = webkit_back_forward_list_item_get_title (item);
> >> +      item_uri = webkit_back_forward_list_item_get_uri (item);
> >> +      here = list3 (make_fixnum (0),
> >> +              build_string (item_title ? item_title : ""),
> >> +              build_string (item_uri ? item_uri : ""));
> >> +    }
> >> +  parent = webkit_back_forward_list_get_back_list_with_limit (list, lim);
> >> +
> >> +  if (parent)
> >> +    {
> >> +      for (i = 1, tem = parent; parent; parent = parent->next, ++i)
> >> +  {
> >> +    item = tem->data;
> >> +    item_title = webkit_back_forward_list_item_get_title (item);
> >> +    item_uri = webkit_back_forward_list_item_get_uri (item);
> >> +    title = build_string (item_title ? item_title : "");
> >> +    uri = build_string (item_uri ? item_uri : "");
> 
> > build_string can produce either multibyte or unibyte strings.  Which
> > ones do we want?  And shouldn't we decode the strings that come from
> > WebKit?
> 
> Sorry for that. We want UTF-8 strings, as that's the format of strings
> which come from WebKitGTK.  (And most GLib-related software, as well).

Sorry, I don't understand: the above produces strings that will be
used by Emacs Lisp.  So UTF-8 is not relevant; the question is whether
the string that comes from WebKitGTK can include non-ASCII characters.
If it can, we need to decode it, e.g. by decode_string_utf_8 (can
these strings include byte sequences that aren't valid UTF-8?).

When this issue is resolved, the changes can be installed.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]