UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)
この手のエラー、
export PYTHONIOENCODING=utf-8
とやるとうまくいく場合がある模様。Python3で確認
技術系の備忘録.基本的に自分だけのためのものなので,詳しく書きません.検索でいらした方、すみません.
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)
export PYTHONIOENCODING=utf-8
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
end
end
local function remapKey(modifiers, key, keyCode)
hs.hotkey.bind(modifiers, key, keyCode, nil, keyCode)
end
remapKey({'ctrl'}, 'b', keyCode('left'))
remapKey({'ctrl'}, 'n', keyCode('down'))
remapKey({'ctrl'}, 'p', keyCode('up'))
remapKey({'ctrl'}, 'f', keyCode('right'))
remapKey({'ctrl'}, 'e', keyCode('end'))
remapKey({'ctrl'}, 'a', keyCode('home'))
remapKey({'ctrl'}, 'h', keyCode('delete'))
dconf reset /org/gnome/settings-daemon/plugins/keyboard/active
dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:swapcaps']"
LANG=C xdg-user-dirs-gtk-update
keybindをemacsに
sudo apt install gnome-tweak-tool
でgnome-tweak-toolをいれて設定
(custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg1"))
brew tap homebrew/versions
brew install gnupg21
(custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg2"))
(setf epa-pinentry-mode 'loopback)
wget http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-25.1.tar.xz wget ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-25.1-mac-6.0.tar.gz tar xvzf emacs-25.1.tar.xz tar xvzf emacs-25.1-mac-6.0.tar.gz cd emacs-25.1 patch -p1 < ../emacs-25.1-mac-6.0/patch-mac cp -R ../emacs-25.1-mac-6.0/mac . cp ../emacs-25.1-mac-6.0/src/* src/ cp ../emacs-25.1-mac-6.0/lisp/term/mac-win.el lisp/term/ cp nextstep/Cocoa/Emacs.base/Contents/Resources/*.icns mac/Emacs.app/Contents/Resources/ ./configure --without-x make make install
で
cp -r mac/Emacs.apps /Applications
init.el で
(mac-auto-ascii-mode 1)