Issue 724767: Minor /Tools/Scripts/crlf.py bugs (original) (raw)

Issue724767

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.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/38338

classification

Title: Minor /Tools/Scripts/crlf.py bugs
Type: Stage:
Components: Demos and Tools Versions:

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, logistix
Priority: normal Keywords:

Created on 2003-04-20 22:09 by logistix, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
crlf.diff logistix,2003-04-20 22:09
Messages (5)
msg15533 - (view) Author: Grant Olson (logistix) Date: 2003-04-20 22:09
Caught these when I tried to cut-and-paste the code. crlf.py uses the variable name file, which it shouldn't anymore. I've attached a patch to fix this problem. It also looks like the method of determining if a file is text or binary isn't unicode safe. Am I right?
msg15534 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-05-13 14:53
Logged In: YES user_id=11375 Fixed (though I changed the variable name to 'filename', not 'file_'.) Yes, it won't be Unicode-safe if the file is in a 16-bit encoding such as UCS-2. It'll be fine for other encodings; for example, UTF-8 wouldn't be a problem.
msg15535 - (view) Author: Grant Olson (logistix) Date: 2003-05-13 15:07
Logged In: YES user_id=699438 I realized a few days ago that lfcr.py has the same problem. I doubt you need it, but I can submit another patch if necessary.
msg15536 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-05-13 17:13
Logged In: YES user_id=11375 Fixed; thanks! I'll go grepping for more cases.
msg15537 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-05-13 18:16
Logged In: YES user_id=11375 Fixed; thanks! I'll go grepping for more cases.
History
Date User Action Args
2022-04-10 16:08:15 admin set github: 38338
2003-04-20 22:09:40 logistix create