5

I love org-mode. It's main reason why i switched from vim. It's really interesting to write reports using Literate Programming. I try to use TODO, agenda etc. to be more productive.

I was able to make it nice, and clean with org-bullets and other fancy stuff...

...but there is one thing left - encoding. I really want to use UTF-8, so i have something like this:

#+BEGIN_SRC emacs-lisp :tangle yes
(setq utf-translate-cjk-mode nil)
(set-locale-environment "pl_PL.UTF-8")
(set-language-environment 'utf-8)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(unless (eq system-type 'windows-nt)
  (progn
    (set-selection-coding-system 'utf-8)
    (set-keyboard-coding-system 'utf-8-mac)))
(prefer-coding-system 'utf-8)
#+END_SRC

And it works in most cases. But when I use for example Deadline or Timestamp, and it's Wednesday (in polish Środa) i got this:

DEADLINE: <2016-05-18 \234r.>

It should be

DEADLINE: <2016-05-18 śr.>

Because there is \234, Emacs can't save buffer as utf-8.

So. My question is:

  • how to setup Emacs to use english locales.
  • or how to setup Emacs org-mode to use utf-8 "ś".

I use GNU Emacs 24.5.1 (x86_64-w64-mingw32)

2
(setq system-time-locale "C")

this may generate english date format.

according to this : https://www.gnu.org/software/emacs/manual/html_node/elisp/Locales.html#Locales locales will affect format-time-string

wish can help.

0

I don't think I had problems with timestamps in other languages with non-ASCII characters (e.g. Spanish, Chinese), but sometimes I do encounter similar situations to yours in some buffers, especially on Windows. Maybe the encoding of your particular org-mode buffer was incorrect? You can try to run M-x revert-buffer-with-coding-system, choose UTF-8, and see what happens. I was able to display the characters correctly in this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.