From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: babel evaluation of python and utf-8 Date: Thu, 26 Jun 2014 09:35:41 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X04Dl-00067V-9Q for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 03:35:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X04Dg-0007rW-42 for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 03:35:49 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:55011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X04Df-0007rL-Tr for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 03:35:44 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I'm having trouble with the babel evaluation of python blocks containing utf-8 encoded characters (which is the encoding of my org file). I tried the approach suggested in this message https://lists.gnu.org/archive/html/emacs-orgmode/2010-12/msg00086.html in the following block #+BEGIN_SRC python :prefix # -*- coding: utf-8 -*- :results output print(u'=E2=88=80') #+END_SRC but when I evaluate it, I get an error File "", line 1 SyntaxError: Non-ASCII character '\xe2' in file on line 1, but no e= ncoding declared; see http://www.python.org/peps/pep-0263.html for details Am I doing something wrong? Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJTq81OAAoJEAQNCjtO0uXH/B4H/1KaHHZ3Acujmyo+tFkTnH32 EJpb0sq2cYj/PUbJJE5H9Mt6SRHYXlu686nRFmkfgEcXIVQZUWAco5ECFL2RoudR /ZBQVO5S514TWoXhoUVtwjeKlRQB8snsTP+QSFjJS+tblxbqk+nFNBDSlgQGA1J+ xEncQ4Oy5FHoNOKti9yV85ro2w4OnXe6nsUr5CWf3Uvh/qbD+bOWUB2OZMlWZbDa 6RZCGmMjbPoZnqdUXQq1yrUUKJfxqbb1XyNuKoGJFnkeETulV1RCu7Oz2IACczvX fugHomxzF6AC7YiLdZHgvHU6N6D6bVq3iVo9VHZNKPzBk3hprNlHZckVcqZSAgU= =7275 -----END PGP SIGNATURE----- --=-=-=--