Python3:
>>> b'\\u201c'.decode('unicode_escape')
'“'
or
>>> '\\u201c'.encode().decode('unicode_escape')
'“'
More Related Contents:
- Why do backslashes appear twice?
- How to print a single backslash?
- How can I print a single backslash?
- How can I put an actual backslash in a string literal (not use it for an escape sequence)?
- Why does printing a tuple (list, dict, etc.) in Python double the backslashes?
- How to understand regular expression with python?
- Process escape sequences in a string in Python
- How to use a variable inside a regular expression?
- How can I remove the ANSI escape sequences from a string in python
- How to un-escape a backslash-escaped string?
- How can I selectively escape percent (%) in Python strings?
- How do I .decode(‘string-escape’) in Python 3?
- What is the purpose of a backslash at the end of a line?
- Decode escaped characters in URL
- How to escape special characters of a string with single backslashes
- python replace single backslash with double backslash
- Escape special characters in a Python string
- Python Regex escape operator \ in substitutions & raw strings
- How to write string literals in python without having to escape them?
- What does a leading `\x` mean in a Python string `\xaa`
- How to encode UTF8 filename for HTTP headers? (Python, Django)
- Is there a way to put comments in multiline code?
- python IDLE shell appears not to handle some escapes correctly
- When should I use escape and safe in Django’s template system?
- Saving UTF-8 texts with json.dumps as UTF-8, not as a \u escape sequence
- In Python, is it possible to escape newline characters when printing a string?
- Error with double backslash in Windows path in Python [duplicate]
- In Python, how do I have a single backslash element in a list?
- How can i parse a comma delimited string into a list (caveat)?
- python replace backslashes to slashes