We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello everyone,
python2 differs from python3 when encoding a string with escape chars. For example:
# python2 my_str.encode('string-escape') # python3 my_str.encode('unicode-escape')
It would be useful to handle the escape encoding in six, such as:
if PY2: encode_escape = 'string-escape' else: encode_escape = 'unicode-escape'
Or a method that handle string encoding escape automatically.
Thanks in advice, Andrea
The text was updated successfully, but these errors were encountered:
In both versions, I believe you can simply use codecs.unicode_escape_(encode|decode).
codecs.unicode_escape_(encode|decode)
Sorry, something went wrong.
No branches or pull requests
Hello everyone,
python2 differs from python3 when encoding a string with escape chars. For example:
It would be useful to handle the escape encoding in six, such as:
Or a method that handle string encoding escape automatically.
Thanks in advice,
Andrea
The text was updated successfully, but these errors were encountered: