emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roland Donat <roland.donat@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-babel, python, encoding and table
Date: Tue, 7 May 2013 19:44:16 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130507T213022-772@post.gmane.org> (raw)
In-Reply-To: 87sj1yppez.fsf@pierrot.dokosmarshall.org

Nick Dokos <ndokos <at> gmail.com> writes:

> 
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> 
> > Am 07.05.2013 20:18, schrieb Eric Schulte:
> >> Andreas Röhler <andreas.roehler <at> 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 <str> 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.
 

  parent reply	other threads:[~2013-05-07 19:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 12:55 org-babel, python, encoding and table Roland Donat
2013-05-07 16:41 ` Eric Schulte
2013-05-07 17:34   ` Andreas Röhler
2013-05-07 18:18     ` Eric Schulte
2013-05-07 18:45       ` Andreas Röhler
2013-05-07 19:20         ` Nick Dokos
2013-05-07 19:40           ` Andreas Röhler
2013-05-07 20:05             ` Nick Dokos
2013-05-08  6:21               ` Andreas Röhler
2013-05-07 19:44           ` Roland Donat [this message]
2013-05-07 19:52             ` Andreas Röhler
2013-05-08  8:36   ` Andreas Röhler
2013-05-29 12:18     ` Roland DONAT
2013-05-29 13:00       ` Eric Schulte
2013-05-29 23:54         ` Christian Wittern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130507T213022-772@post.gmane.org \
    --to=roland.donat@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).