This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lys.nikolaou
Recipients christian.heimes, lys.nikolaou, pablogsal
Date 2020-06-12.17:28:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> +    Py_ssize_t linesize = PyUnicode_GET_LENGTH(line);

This line is wrong though, since PyUnicode_GET_LENGTH returns the length in code points and PyUnicode_DecodeUTF8 expects the number of bytes. For non-ascii input this would push the caret further to the left. For example:

$ ./python.exe
Python 3.10.0a0 (heads/master-dirty:e2fb8a2c42, Jun 12 2020, 20:22:52)
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> "Ṕýţĥòñ" +
  File "<stdin>", line 1
    "Ṕýţĥòñ" +
         ^
SyntaxError: invalid syntax
History
Date User Action Args
2020-06-12 17:28:31lys.nikolaousetrecipients: + lys.nikolaou, christian.heimes, pablogsal
2020-06-12 17:28:31lys.nikolaousetmessageid: <[email protected]>
2020-06-12 17:28:31lys.nikolaoulinkissue40958 messages
2020-06-12 17:28:30lys.nikolaoucreate