From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Beffara Subject: Re: Babel, Python and UTF-8 Date: Thu, 02 Dec 2010 02:36:21 +0100 Message-ID: References: <87fwuhas6t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=32825 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNy68-0007m9-E9 for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:36:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNy67-0007lL-FJ for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:36:36 -0500 Received: from lo.gmane.org ([80.91.229.12]:48097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNy67-0007l5-9E for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:36:35 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNy65-0003zI-2n for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 02:36:33 +0100 Received: from cxr69-3-82-225-61-110.fbx.proxad.net ([82.225.61.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Dec 2010 02:36:33 +0100 Received: from vbeffara by cxr69-3-82-225-61-110.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Dec 2010 02:36:33 +0100 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, > 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 : --8<---------------cut here---------------start------------->8--- #+begin_src python # -*- coding: utf-8 -*- s = "é" #+end_src --8<---------------cut here---------------end--------------->8--- 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. That would be fantastic ! (And possibly useful in other cases as well ...) Thanks, /vincent