unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>, joakim@verona.se
Cc: emacs-devel@gnu.org
Subject: Re: String handling in xwidget primitives
Date: Fri, 29 Jan 2016 14:57:20 -0800	[thread overview]
Message-ID: <56ABEE50.7070804@cs.ucla.edu> (raw)
In-Reply-To: <838u38xklk.fsf@gnu.org>

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	other threads:[~2016-01-29 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 19:16 String handling in xwidget primitives Eli Zaretskii
2016-01-29 22:57 ` Paul Eggert [this message]
2016-01-30  7:57   ` Eli Zaretskii
     [not found] <83bn84xn2p.fsf@gnu.org>
     [not found] ` <m3lh78rxwe.fsf@exodia.verona.se>
2016-01-29 20:25   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56ABEE50.7070804@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).