[PATCH] filter: set environment variable PYTHONIOENCODING to utf-8
Roy Marples
roy at marples.name
Wed Mar 8 20:01:59 CET 2017
On 06/03/2017 09:14, Roy Marples wrote:
> On 04/03/2017 12:35, John Keeping wrote:
>> On Thu, Feb 23, 2017 at 03:48:23PM +0000, Roy Marples wrote:
>>> This allows different versions of Python to be used rather than
>>> forcing version specific encoding in each script.
>>>
>>> Signed-off-by: Roy Marples <roy at marples.name>
>>> ---
>>> filter.c | 8 ++++++++
>>> filters/email-gravatar.py | 3 ---
>>> filters/syntax-highlighting.py | 5 +----
>>> 3 files changed, 9 insertions(+), 7 deletions(-)
>>
>> Neat! This definitely makes writing it easier to get it right with
>> Python filters, but having filter_env_set seems unnecessary.
>>
>> Is there a reason not to either:
>>
>> 1) set PYTHONIOENCODING unconditionally early in startup
>>
>> or
>>
>> 2) set the environment in the child after forking
>
> No reason.
> I went this approach so that it's only set once when needed, happy to
> re-base my work with either of the two above options.
Is there anything more you want me to do here?
Roy
More information about the CGit
mailing list