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.

作者 xtreak
收信人 sachin, serhiy.storchaka, xtreak
日期 2018-09-14.09:30:53
SpamBayes Score -1.0
Marked as misclassified
Message-id <1536917453.72.0.956365154283.issue32080@psf.upfronthosting.co.za>
In-reply-to
内容
Is it something specific to the environment? I tried the test on Ubuntu 16.04 on both master and on v3.6.3 with no errors. Maybe if you can execute the following code based on which the test is executed then it will be helpful to debug this.


import locale

foo, enc = locale.getlocale(locale.LC_CTYPE)
# Search non-ASCII letter
for i in range(128, 256):
    try:
        c = bytes([i]).decode(enc)
        sletter = c.lower()
        if sletter == c: continue
        bletter = sletter.encode(enc)
        if len(bletter) != 1: continue
        if bletter.decode(enc) != sletter: continue
        bpat = re.escape(bytes([i]))
        break
    except (UnicodeError, TypeError):
        pass
else:
    bletter = None
    bpat = b'A'
# Bytes patterns

print(bletter)
print(bpat)
print(foo)
print(enc)



Thanks
历史
日期 用户 动作 参数
2018-09-14 09:30:53xtreak修改recipients: + xtreak, serhiy.storchaka, sachin
2018-09-14 09:30:53xtreak修改messageid: <1536917453.72.0.956365154283.issue32080@psf.upfronthosting.co.za>
2018-09-14 09:30:53xtreak链接issue32080 messages
2018-09-14 09:30:53xtreak创建