emacs-devel
[Top][All Lists]
Advanced

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

Re: String handling in xwidget primitives


From: Paul Eggert
Subject: Re: String handling in xwidget primitives
Date: Fri, 29 Jan 2016 14:57:20 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 01/29/2016 11:16 AM, Eli Zaretskii wrote:
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?

As I understand it the default is UTF-8, but you can override this by using a custom encoding. I'd guess we should just use the default.

Dumb question: shouldn't URIs be encoded in punycode? See the thread starting here:

https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01373.html

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


I'm skeptical. No doubt there are issues in this area, but I can also find random documents saying that JS scripts *with* BOMs make programs croak, e.g.:

http://compgroups.net/comp.lang.php/javascript-php-byte-order-mark-problem/1384837

Plus, I see some evidence that at least one JavaScript linter will warn you about BOMs:

https://github.com/jshint/jshint/pull/2285



reply via email to

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