mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-31 00:52:52 +08:00
[utils] Correct decoding of large unicode codepoints in uppercase_escape (Fixes #2664)
This commit is contained in:
parent
c8fc3fb524
commit
a612753db9
@ -1264,8 +1264,8 @@ class PagedList(object):
|
|||||||
|
|
||||||
def uppercase_escape(s):
|
def uppercase_escape(s):
|
||||||
return re.sub(
|
return re.sub(
|
||||||
r'\\U([0-9a-fA-F]{8})',
|
r'\\U[0-9a-fA-F]{8}',
|
||||||
lambda m: compat_chr(int(m.group(1), base=16)), s)
|
lambda m: m.group(0).decode('unicode-escape'), s)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
struct.pack(u'!I', 0)
|
struct.pack(u'!I', 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user