[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-shell-send-region uses wrong encoding?

From: Stefan Monnier
Subject: Re: python-shell-send-region uses wrong encoding?
Date: Wed, 30 Oct 2013 07:37:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> IIUC the second added line "-*- coding: utf-8 -*-\n" should not be needed,
> as that's the default at the Python side anyway.

Based on the OP's experience, it seems this is not true.
Also, the doc I can find indicates that the default is ASCII (and was
latin-1 in the past, which is what the OP seems to be seeing).

But, you're a lot more experienced in Python than I am (I never wrote
a single line of Python, basically), so maybe there's another
explanation for the OP's problem?

> Also functions tracing a possibly error might see a different line-offset
> that way - just an abstract reasoning so far.

This function is used to send a string (typically extracted from the
region) not a file, so the offsets have always been wrong anyway (except
when the region happens to start on the first line).

By, yes, as it happens, the patch I installed does include some other
change to try and translate the offsets appropriately.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]