From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Babel, Python and UTF-8 Date: Thu, 02 Dec 2010 10:11:52 +0100 Message-ID: <80bp54a693.fsf@missioncriticalit.com> References: <87fwuhas6t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Vincent and Eric, Vincent Beffara wrote: >> I would suggest just trying it out first and seeing if you get an error >> without such a line. > > Well, I do, that's why I'm asking ;-) > >> Also, you could try adding the line to the beginning of your code >> block. > > I tried like this : > > #+begin_src python > # -*- coding: utf-8 -*- > s =3D "=C3=A9" > #+end_src I'm not sure to understand your problem. In fact, the problem is not about "inserting a prefix to the block", it's about the coding system itself, I guess. Your "=C3=A9" in your Org buffer, how is it encoded? Is your Org buffer an= UTF-8 one, or a Latin-1? In the first case, I don't see why: - it would fail - it would even need to be specified In the second, you want an ISO Latin 1 block of text to be tangled or execu= ted as UTF-8. Is this right? > The error message tells me that the error happens on line 4, hence the > coding line ends up on line 3, and python only takes it into account if > it is one of the first two ... so it almost works, but it doesn't. > >> If there is definitely a problem please reply to this thread and we >> could easily add a header argument for this case, possibly named >> ":prefix" which could be used to specify such a code-block-prefix for >> code evaluation. This header argument could then be set globally or on >> the file, heading, or code block level. Isn't such a prefix already available through the "shebang" option: can't it be multiline? Anyway, I don't think it's the problem here... Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode