diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-04-01 13:17:07 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-04-01 13:17:07 +0200 |
commit | a612753db9c22556967bf60c2eee8a8e63cd98ba (patch) | |
tree | 3628566f703d93b1beaf431cf1eaef8d1b0d3929 /youtube_dl/utils.py | |
parent | c8fc3fb524fff44fd1e162abc08f7f1678aa4233 (diff) |
[utils] Correct decoding of large unicode codepoints in uppercase_escape (Fixes #2664)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index de9881372..e54ea9d61 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1264,8 +1264,8 @@ class PagedList(object): def uppercase_escape(s): return re.sub( - r'\\U([0-9a-fA-F]{8})', - lambda m: compat_chr(int(m.group(1), base=16)), s) + r'\\U[0-9a-fA-F]{8}', + lambda m: m.group(0).decode('unicode-escape'), s) try: struct.pack(u'!I', 0) |