[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Babel, Python and UTF-8
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Re: Babel, Python and UTF-8 |
Date: |
Thu, 02 Dec 2010 17:09:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
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 = "é"
> #+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 "é" 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 executed
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
--
Sébastien Vauban
- [Orgmode] Re: Babel, Python and UTF-8, (continued)
- [Orgmode] Re: Babel, Python and UTF-8, Sébastien Vauban, 2010/12/03
- Re: [Orgmode] Re: Babel, Python and UTF-8, Eric Schulte, 2010/12/03
- [Orgmode] Re: Babel, Python and UTF-8, Vincent Beffara, 2010/12/03
- Re: [Orgmode] Re: Babel, Python and UTF-8, Eric Schulte, 2010/12/05
- [Orgmode] Re: Babel, Python and UTF-8, Dan Davison, 2010/12/06
- Re: [Orgmode] Re: Babel, Python and UTF-8, Eric S Fraga, 2010/12/06
- Re: [Orgmode] Re: Babel, Python and UTF-8, Thomas S. Dye, 2010/12/06
- [Orgmode] Re: Babel, Python and UTF-8, Achim Gratz, 2010/12/06
- Re: [Orgmode] Re: Babel, Python and UTF-8, Thomas S. Dye, 2010/12/06
- [Orgmode] Re: Babel, Python and UTF-8, Dan Davison, 2010/12/06
- [Orgmode] Re: Babel, Python and UTF-8,
Sébastien Vauban <=
- [Orgmode] Re: Babel, Python and UTF-8, Vincent Beffara, 2010/12/02
- Re: [Orgmode] Re: Babel, Python and UTF-8, Christopher Allan Webber, 2010/12/03