Timeline for answer to Process escape sequences in a string in Python by user19087
Current License: CC BY-SA 3.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 4, 2023 at 12:17 | comment | added | holdenweb |
Interestingly, six years later escape-decoderemains undocumented!
|
|
| Dec 17, 2020 at 1:29 | comment | added | Glen Whitney | Moreover, in the link that Hack5 provides, the python maintainers make it clear that escape_decode may be removed without warning in any future version, and that the "unicode_escape" codec is the recommended way to go about this. | |
| Oct 26, 2019 at 19:03 | comment | added | Hack5 | Just an FYI, this function is technically not public. see bugs.python.org/issue30588 | |
| Aug 16, 2017 at 17:10 | comment | added | OpenAI stole this from rspeer |
This is the answer for situations where the escape sequences you have are \x escapes of UTF-8 bytes. But because it decodes bytes to bytes, it doesn't -- and can't -- decode any escapes of non-ASCII Unicode characters, such as \u escapes.
|
|
| May 23, 2017 at 12:02 | history | edited | URL Rewriter Bot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
| Feb 21, 2017 at 18:42 | comment | added | jwd | This is the real answer (: Too bad it relies upon a poorly-documented function. | |
| May 5, 2016 at 21:11 | history | edited | user19087 | CC BY-SA 3.0 |
added 91 characters in body
|
| May 5, 2016 at 20:27 | history | answered | user19087 | CC BY-SA 3.0 |