From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Lane Subject: org-protocol encoding issue Date: Mon, 04 Mar 2013 13:19:14 -0600 Message-ID: <5134F3B2.7090608@imap.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCauw-0008Fb-Uh for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:19:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCaus-00012o-38 for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:19:22 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCaur-00012f-VO for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:19:18 -0500 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 8278920B90 for ; Mon, 4 Mar 2013 14:19:17 -0500 (EST) Received: from [127.0.0.1] (unknown [207.158.41.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 78CA0C80E91 for ; Mon, 4 Mar 2013 14:19:16 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I am having an encoding problem with org-protocol. Here is my setup: 1. Windows 7 running emacs 24.2 and org-mode 7.8. 2. An Opera bookmark with location: javascript:location.href= 'org-protocol://capture://w/'+ encodeURIComponent(location.href)+'/'+ encodeURIComponent(document.title)+'/'+ encodeURIComponent(window.getSelection()) 3. The following code in my .emacs: (setq org-capture-templates `(("w" "Capture snippet" entry ( file+headline "~/org/snip.org" "Snips:") ,(concat "* Fact: '%i' :" (format "%s" org-drill-question-tag) ":\n:PROPERTIES:\n :DATE_ADDED: %u\n :SOURCE_LINK: %c\n:END:\n") :empty-lines 1 :immediate-finish t) [...])) 4. The file snip.org starts out encoded as UTF-8. When I highlight English text and click the bookmark, the highlighted text is added to the file without any problem. When I highlight Cyrillic text and click the bookmark, the highlighted text is apparently added, but I get a warning to the effect that utf-8-dos had been used in unsuccessfully trying to encode said text. Accepting the default does not obtain a readable result. Furthermore, attempts to select more text and create other snippets no longer appear to work. In both cases, what had started out as a file encoded in UTF-8 ends up saved as a file encoded in ANSI. I was not able to make much sense of posts from a couple of years ago that appear to address the same or related issue. Can anyone help? Cheers... -- Alex Lane