Movatterモバイル変換


[0]ホーム

URL:


homepage

Message257688

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authormethane
Recipientsezio.melotti, methane, python-dev, r.david.murray, serhiy.storchaka, vstinner
Date2016-01-07.13:50:12
SpamBayes Score-1.0
Marked as misclassifiedYes
Message-id<1452174612.79.0.567859378376.issue24870@psf.upfronthosting.co.za>
In-reply-to
Content
FYI, I found a workaround.https://github.com/PyMySQL/PyMySQL/pull/409_table = [chr(i) for i in range(128)] + [chr(i) for i in range(0xdc80, 0xdd00)]def decode_surroundescape(s):    return s.decode('latin1').translate(_table)In [15]: data = b'\xff' * 1024 * 1024In [16]: data.decode('ascii', 'surrogateescape') == decode_surroundescape(data)Out[16]: TrueIn [17]: %timeit data.decode('ascii', 'surrogateescape')1 loops, best of 3: 394 ms per loopIn [18]: %timeit decode_surroundescape(data)10 loops, best of 3: 40 ms per loop
History
DateUserActionArgs
2016-01-07 13:50:12methanesetrecipients: +methane,vstinner,ezio.melotti,r.david.murray,python-dev,serhiy.storchaka
2016-01-07 13:50:12methanesetmessageid: <1452174612.79.0.567859378376.issue24870@psf.upfronthosting.co.za>
2016-01-07 13:50:12methanelinkissue24870 messages
2016-01-07 13:50:12methanecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp