[issue46598] ElementTree: wrong XML prolog for the utf-8-sig encoding

2022-02-01 Thread Petr Prikryl
New submission from Petr Prikryl : When ElementTree object is to be written to the file, and when BOM is needed, the 'utf-8-sig' can be used for the purpose. However, the XML prolog then looks like... ... and that encoding in the prolog makes no sense. Therefore, the utf-8-sig

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2015-09-21 Thread Petr Prikryl
Petr Prikryl added the comment: @eryksun: I see. In my case, I can set the locale before importing the time module. However, the code (asciidoc3.py) will be used as a module, and I cannot know if the user imported the time module or not. Instead of your suggestion result = result.encode

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2015-09-19 Thread Petr Prikryl
Petr Prikryl added the comment: I have worked around a bit differently -- the snippet from the code: result = time.tzname[0]# simplified version of the original code. # Because of the bug in Windows libraries, Python 3.3 tried to work around # some issues. However, the shit hit

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2015-09-18 Thread Petr Prikryl
Petr Prikryl added the comment: I have just observed behaviour for the Czech locale. I tried to avoid collisions with stdout encoding, writing the strings into a file using UTF-8 encoding: tzname_bug.py -- #!python3 import time import sys

[issue1145257] shutil.copystat() may fail...

2013-01-27 Thread Petr Prikryl
Petr Prikryl added the comment: Well, it is quite an old event. Anyway, I have fixed the simple example, and launched it on Python 2.6, 2.7, 3.2, 3.3. It does not fail now. But I did not tested it heavily. From my point of view, it was probably fixed