[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8384670615a90418fc52c3881242b7c10d1f2b13 by Inada Naoki in branch 
'3.7':
bpo-20844: open script file with "rb" mode (GH-12616)
https://github.com/python/cpython/commit/8384670615a90418fc52c3881242b7c10d1f2b13


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +12579

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1 by Inada Naoki in branch 
'master':
bpo-20844: open script file with "rb" mode (GH-12616)
https://github.com/python/cpython/commit/10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1


--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-03-29 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +12552
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2017-08-08 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2017-08-08 Thread Steven Winfield

Steven Winfield added the comment:

I've just been bitten by this on 3.6.2, Windows Server 2008 R2, when running 
the setup.py script for QuantLib-SWIG:
https://github.com/lballabio/QuantLib-SWIG/blob/v1.10.x/Python/setup.py

It seems there is different behaviour depending on whether:
  * Unix (LF) or Windows (CRLF) line endings are used
  * The file is >4096 bytes or <=4096 bytes
  * The module docstring has an initial space

Some of that has been mentioned previously, but I think the 4096-byte limit 
might be new, which is why I'm posting.

I've attached a script I used to come up with the results below. It contains:
  * a -*- coding line (for iso-8859-1 in this case)
  * a docstring consisting entirely of lines of x's, of length 78
  * Unix line endings

The file's length is exactly 4096 bytes.

Running this, or slightly modified versions of this, with a 3.6.2 interpreter 
gave the following results:

  * In all cases, when Windows line endings were used there was no issue - 
running the script produced no errors or output.

  * With Unix line endings:

* File length <= 4096, with no leading spaces in the docstring:
  File "issue20844.py", line 1
SyntaxError: encoding problem: iso-8859-1

* File length > 4096, with no leading spaces in the docstring:
  File "issue20844.py", line 56
x"""
   ^
SyntaxError: EOF while scanning triple-quoted string literal


* Any file length, with the first 'x' on line 3 replaced with a space (line 
2 if the coding line is ignored):
  File "issue20844.py", line 2

x
^
IndentationError: unexpected indent

I had no issues with python 2.7.13.

--
nosy: +steven.winfield
versions: +Python 3.6
Added file: http://bugs.python.org/file47065/issue20844.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2014-12-27 Thread Ned Batchelder

Ned Batchelder added the comment:

This bug just bit me.  Changing # coding: utf8 to # coding: utf-8 works 
around it.

--
nosy: +nedbat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20844
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2014-12-27 Thread Ned Batchelder

Ned Batchelder added the comment:

(oops: with Python 3.4.1 on Windows)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20844
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2014-07-30 Thread Mark Lawrence

Mark Lawrence added the comment:

I've tried to make the title more meaningful, feel free to change it if you can 
think of something better.

--
components: +Interpreter Core
nosy: +tim.golden, zach.ware
title: coding bug remains in 3.3.5rc2 - SyntaxError: encoding problem: 
iso-8859-1 on Windows
type:  - behavior
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20844
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com