[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Coding systems in Babel
From: |
Vincent Beffara |
Subject: |
[Orgmode] Re: Coding systems in Babel |
Date: |
Tue, 07 Dec 2010 14:24:48 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) |
Hello,
> So, the instance of python spawned by C-c C-c receives the text as
> latin-1 encoded. Somewhere a conversion from UTF8 to latin-1
> happens. But I don't want that, I want everything to stay in UTF8 from
> the beginning to the end. I guess I have two questions:
>
> At what point in the process is the convertion performed ?
>
> How do I prevent it / how do I specify UTF8 as the exchange format
> between Org-Babel and outside processes spawned by C-c C-c ?
Mmmmkay, answering to myself (you never know, maybe it will be useful to
someone else later ...): the answer to that is in the general
interprocess comunication in Emacs. I ended up doing this:
--8<---------------cut here---------------start------------->8---
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
--8<---------------cut here---------------end--------------->8---
and everything works fine now.
Having to set this by hand is a bit counter-intuitive though - would it
make sense to have babel set =coding-system-for-read= and
=coding-system-for-write= when running a subprocess ? From what I
understand, =shell-command-on-region= does that automatically but
=org-babel-eval= uses a temporary buffer which loses the encoding choice
for the .org file buffer.
Sorry for the noise, and thanks to all for this excellent tool ! I am
getting addicted to org and babel by the minute ...
Cheers,
/v