[Top][All Lists]

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

String handling in xwidget primitives

From: Eli Zaretskii
Subject: String handling in xwidget primitives
Date: Fri, 29 Jan 2016 21:16:07 +0200

The primitives xwidget-webkit-goto-uri and
xwidget-webkit-execute-script accept Lisp strings as arguments and
pass their data unaltered to the underlying GTK functions.  I think we
need to encode these strings first, but I cannot figure out which
encoding should be used.  Is it UTF-8 or something locale-dependent?
xwidget-webkit-goto-uri accepts file names (AFAIU), so perhaps it
should encode the argument as we do with file names?

Also, random documents on the Internet claim JS scripts should have a
BOM if they are in UTF-8, is that correct?

xwidget-webkit-get-title uses build_string to create a Lisp string
which it returns, but build_string is not really appropriate for
non-ASCII strings.  In what encoding does webkit_web_view_get_title
return its value?  Is that UTF-8, or could that be something else?  (I
cannot find any documentation of that.)

In any case, what we have now is incorrect, and can only work by luck.
We ought to fix that before the release.

reply via email to

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