Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90e8147

Browse files
committed
Marc-Andre Lemburg <[email protected]>:
Change the default encoding to 'ascii' (it was previously defined as UTF-8). Note: The implementation still uses UTF-8 to implement the buffer protocol, so C APIs will still see UTF-8. This is on purpose: rather than fixing the Unicode implementation, the C APIs should be made Unicode aware.
1 parent 753131c commit 90e8147

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4710,7 +4710,7 @@ void _PyUnicode_Init()
47104710

47114711
/* Init the implementation */
47124712
unicode_empty = _PyUnicode_New(0);
4713-
strcpy(unicode_default_encoding, "utf-8");
4713+
strcpy(unicode_default_encoding, "ascii");
47144714
}
47154715

47164716
/* Finalize the Unicode implementation */

0 commit comments

Comments
 (0)