Fork me on GitHub

Is there anyone here who’s also having problems with copying nordic characters from spacemacs in MacOs?


I’ve got the following in my .spacemacs:

(defun copy-from-osx ()
    (shell-command-to-string "pbpaste"))

  (defun paste-to-osx (text &optional push)
    (let ((process-connection-type nil))
      (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
        (process-send-string proc text)
        (process-send-eof proc))))

  (setq interprogram-cut-function 'paste-to-osx) ;; Paste from system clipboard
  (setq interprogram-paste-function 'copy-from-osx) ;; Copy to system clipboard


It works great for ASCII chars, but if for example I try to yank this line: Du må få rødgrød med fløde og ærter and paste it here, it becomes: Du m√• f√• r√∏dgr√∏d med fl√∏de og √¶rter


I’ve tried changing my “Coding system for X selection” to utf-8-ndf-mac”, “utf-8-hfs-mac” and a number of other options, and it seems to make no difference.