{{ message }}
Conversation
…gs in datetime classes A follow-up of bpo-34454.
Now that the bug is fixed, the try/catch can be removed.
This is now also a more complete fix for bpo-6697.
This will cut down on some of the per-environment variability of this function.
This reverts commit 3973be1.
This passes a backslash-escaped unicode string to strftime in the event that locale encoding fails. To ensure that the relevant string is round-trippable, all backslashes in the original string are double-escaped, and then unescaped when the result is decoded.
This reverts commit c1381d5.
Member
Author
Member
Author
|
I'm able to reproduce this issue only on Ubuntu 14. For some reason with #include <stdlib.h>
#include <stdio.h>
int main() {
const wchar_t str[] = L"\xd800";
char buffer[32];
int rv = wcstombs(NULL, str, 0);
printf("%d\n", rv);
}Works fine on both Ubuntu 14 and other Linux (returns |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is intended to be re-based against #8878 - that PR adds tests, this one adds the fix.
I am making this PR before that one is merged mainly because this is some crazy platform-specific behavior, and I want to test it on the full cross-platform test suite.
https://bugs.python.org/issue34481
https://bugs.python.org/issue34481