emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-protocol encoding issue
@ 2013-03-04 19:19 Alex Lane
  0 siblings, 0 replies; only message in thread
From: Alex Lane @ 2013-03-04 19:19 UTC (permalink / raw)
  To: emacs-orgmode

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 <alexpgp@imap.cc>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-04 19:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 19:19 org-protocol encoding issue Alex Lane

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).