From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Donat Subject: Re: org-babel, python, encoding and table Date: Tue, 7 May 2013 19:44:16 +0000 (UTC) Message-ID: References: <87zjw6spxt.fsf@gmail.com> <51893B1C.50609@easy-emacs.de> <87d2t2slf7.fsf@gmail.com> <51894BE4.5010508@easy-emacs.de> <87sj1yppez.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZnoU-0004kG-MQ for emacs-orgmode@gnu.org; Tue, 07 May 2013 15:44:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZnoP-0001zu-IN for emacs-orgmode@gnu.org; Tue, 07 May 2013 15:44:38 -0400 Received: from plane.gmane.org ([80.91.229.3]:54958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZnoP-0001ze-Bl for emacs-orgmode@gnu.org; Tue, 07 May 2013 15:44:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UZnoN-0004wW-7o for emacs-orgmode@gnu.org; Tue, 07 May 2013 21:44:31 +0200 Received: from mar92-18-78-239-131-140.fbx.proxad.net ([78.239.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 21:44:31 +0200 Received: from roland.donat by mar92-18-78-239-131-140.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 21:44:31 +0200 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@gnu.org Nick Dokos gmail.com> writes: > > Andreas Röhler easy-emacs.de> writes: > > > Am 07.05.2013 20:18, schrieb Eric Schulte: > >> Andreas Röhler easy-emacs.de> writes: > >> ... > >> Maybe Python simply needs to be convinced to print in utf-8 format? > > > > Get the wrong results with a Ipython0.12, but correct with Python3.2.3 and Python3.3 - all called from Emacs24.3 > > unicode handling is one of the big changes between Python 2.x and Python > 3.x. It's good to know that Python 3.x seems to make it trivial to > handle unicode correctly (although there might still be dragons there). > > Here are some links: > > http://docs.python.org/2/howto/unicode.html > http://docs.python.org/3/howto/unicode.html > > that might shed some light. > Thank you very much for your answers!!! Well, I read that Python 3.x has improved the encoding handling but for now I have to keep using 2.7.x Python version. Using Python outside of org-mode is not a problem to manage encoding correctly. In general, you can use encode/decode methods to get what you want. Then, using the print function turns the coded character into human readable ones. But, what is hurting my poor little neurone is the fact that I don't understand why I get the correct result when the evaluation returns a single value and a wrong answer with a table. I think I have to understand how org-babel builds a table from a Python list of lists but I have to confess that I'm afraid of reading Lisp programs, though Emacs is my best friend ;)... Well, I'll keep on investigating on that subject Thanks again for your help! Roland.