all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* BUG copyright sign
@ 2013-02-27  8:20 Andreas Röhler
  2013-02-27  8:30 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2013-02-27  8:20 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

When evaluating the source examples attached, it fails sending

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa9' in position 0: ordinal not in range(128)


[-- Attachment #2: UnicodeEncodeError-lp-550661-test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 153 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG copyright sign
  2013-02-27  8:20 BUG copyright sign Andreas Röhler
@ 2013-02-27  8:30 ` Bastien
  2013-02-27  8:53   ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-02-27  8:30 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: emacs-orgmode

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> When evaluating the source examples attached, it fails sending
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xa9' in position 0: ordinal not in range(128)

This is a Python error, not an Org error.

I guess you are using Python 2.x?

The way Python handles encoding changed in Python 3.0.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG copyright sign
  2013-02-27  8:30 ` Bastien
@ 2013-02-27  8:53   ` Andreas Röhler
  2013-02-27  9:12     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2013-02-27  8:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Am 27.02.2013 09:30, schrieb Bastien:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> When evaluating the source examples attached, it fails sending
>>
>> Traceback (most recent call last):
>>    File "<stdin>", line 1, in <module>
>> UnicodeEncodeError: 'ascii' codec can't encode character u'\xa9' in position 0: ordinal not in range(128)
>
> This is a Python error, not an Org error.
>
> I guess you are using Python 2.x?
>
> The way Python handles encoding changed in Python 3.0.
>

Forms work from all Python shells

 > python
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> print(u'\xA9')
©
 >>> quit()
 > python3
Python 3.3.0 (default, Oct 01 2012, 09:13:30) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> print(u'\xA9')
©
 >>> print(u'\u00A9')
©
 >>>

AFAIS bug is caused by calling shell-command-on-region

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG copyright sign
  2013-02-27  8:53   ` Andreas Röhler
@ 2013-02-27  9:12     ` Bastien
  2013-02-27  9:23       ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-02-27  9:12 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: emacs-orgmode

Hi Andreas,

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Forms work from all Python shells

You need to test the form in a regular shell, not a Python shell.

See `org-babel-sh-command'.

> AFAIS bug is caused by calling shell-command-on-region

See above, and edebug-defun `org-babel-shell-command-on-region'
to see what's wrong here.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG copyright sign
  2013-02-27  9:12     ` Bastien
@ 2013-02-27  9:23       ` Andreas Röhler
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2013-02-27  9:23 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Am 27.02.2013 10:12, schrieb Bastien:
> Hi Andreas,
>
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Forms work from all Python shells
>
> You need to test the form in a regular shell, not a Python shell.

Hi Bastien,

do you mean this:

 > python -c "print(u'\xA9')"
©
 > python -c "print(u'\u00A9')"
©
 > python3 -c "print(u'\xA9')"
©
 > python3 -c "print(u'\u00A9')"
©
 >

>
> See `org-babel-sh-command'.
>
>> AFAIS bug is caused by calling shell-command-on-region
>
> See above, and edebug-defun `org-babel-shell-command-on-region'
> to see what's wrong here.
>

Well, that was a long-time bug in python-mode, so I'm not surprised to find it here.
BTW org-babel solution looks quite interesting. Just porting existing fix might not be the best.
Need to investigate it further.

Cheers,

Andreas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-27  9:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27  8:20 BUG copyright sign Andreas Röhler
2013-02-27  8:30 ` Bastien
2013-02-27  8:53   ` Andreas Röhler
2013-02-27  9:12     ` Bastien
2013-02-27  9:23       ` Andreas Röhler

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.