Victor Stinner
f3e7ea5b8c
bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397)
...
PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.
2020-02-11 14:29:33 +01:00
Eric Wieser
bf15d5b775
Correct the documented default encoding (GH-18429)
...
From the source for `PyUnicode_Decode`, the implementation is:
```
if (encoding == NULL) {
return PyUnicode_DecodeUTF8Stateful(s, size, errors, NULL);
}
```
which is pretty clearly not defaulting to ASCII.
---
I assume this needs neither a news entry nor bpo link.
2020-02-10 15:32:18 -08:00
Victor Stinner
d68b592dd6
bpo-38896: Remove PyUnicode_ClearFreeList() function (GH-17354)
...
Remove PyUnicode_ClearFreeList() function: the Unicode free list has
been removed in Python 3.3.
2019-11-23 02:30:32 +01:00
Serhiy Storchaka
e835b31d2b
bpo-38600: NULL -> ``NULL``. (GH-17001)
...
Also fix some other formatting.
2019-10-30 21:37:16 +02:00
Serhiy Storchaka
25fc088607
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
...
Replace all *NULL* with ``NULL``.
2019-10-30 12:03:20 +02:00
Stéphane Wirtel
cbb6484573
Doc: Replace the deprecated highlightlang directive by highlight. ( #13377 )
...
highlightlang is deprecated since April 2018 in Sphinx.
See https://github.com/sphinx-doc/sphinx/pull/4845
2019-05-17 15:25:34 +05:30
toonarmycaptain
85225b6a58
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
...
Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.
2019-05-08 18:02:34 +02:00
pxinwr
f4b0a1c0da
bpo-31904: Add encoding support for VxWorks RTOS (GH-12051)
...
Use UTF-8 as the system encoding on VxWorks.
The main reason are:
1. The locale is frequently misconfigured.
2. Missing some functions to deal with locale in VxWorks C library.
2019-03-04 10:02:06 +01:00
Serhiy Storchaka
57dd79e6f7
Fix documented signatures for C API functions. (GH-11236)
2018-12-19 15:31:40 +02:00
Victor Stinner
998b806366
Revert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)
...
This reverts commit 886483e2b9
.
2018-09-12 00:23:25 +02:00
Victor Stinner
886483e2b9
bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)
...
* Add %T format to PyUnicode_FromFormatV(), and so to
PyUnicode_FromFormat() and PyErr_Format(), to format an object type
name: equivalent to "%s" with Py_TYPE(obj)->tp_name.
* Replace Py_TYPE(obj)->tp_name with %T format in unicodeobject.c.
* Add unit test on %T format.
* Rename unicode_fromformat_write_cstr() to
unicode_fromformat_write_utf8(), to make the intent more explicit.
2018-09-07 18:00:58 +02:00
Victor Stinner
9089a26591
bpo-29240: PyUnicode_DecodeLocale() uses UTF-8 on Android ( #5272 )
...
PyUnicode_DecodeLocaleAndSize(), PyUnicode_DecodeLocale() and
PyUnicode_EncodeLocale() now use always use the UTF-8 encoding on
Android, instead of the current locale encoding.
On Android API 19, mbstowcs() and wcstombs() are broken and cannot be
used.
2018-01-22 19:07:32 +01:00
Victor Stinner
7ed7aead95
bpo-29240: Fix locale encodings in UTF-8 Mode ( #5170 )
...
Modify locale.localeconv(), time.tzname, os.strerror() and other
functions to ignore the UTF-8 Mode: always use the current locale
encoding.
Changes:
* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or
encoding error, they return the position of the error and an error
message which are used to raise Unicode errors in
PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale().
* Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx().
* PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all
cases, especially for the strict error handler.
* Add _Py_DecodeUTF8Ex(): return more information on decoding error
and supports the strict error handler.
* Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex().
* Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx().
* Ignore the UTF-8 mode to encode/decode localeconv(), strerror()
and time zone name.
* Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use
the "current" locale.
* Remove _PyUnicode_DecodeCurrentLocale(),
_PyUnicode_DecodeCurrentLocaleAndSize() and
_PyUnicode_EncodeCurrentLocale().
2018-01-15 10:45:49 +01:00
Serhiy Storchaka
e613e6add5
bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). ( #2285 )
...
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters.
2017-06-27 16:03:14 +03:00
Louie Lu
88c38b32b7
bpo-28415: Note 0 conversion different between Python and C ( #885 )
2017-04-27 11:36:35 +08:00
Serhiy Storchaka
84b8e92e46
bpo-29918: Add missed "const" modifiers in C API documentation. ( #846 )
2017-03-30 10:01:03 +03:00
Serhiy Storchaka
c85a26628c
bpo-28749: Fixed the documentation of the mapping codec APIs. ( #487 )
...
Added the documentation for PyUnicode_Translate().
2017-03-19 08:15:17 +02:00
Serhiy Storchaka
2a404b63d4
Issue #28769 : The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
...
is now of type "const char *" rather of "char *".
2017-01-22 23:07:07 +02:00
Serhiy Storchaka
fc600834d8
Issue #29087 : Removed the documentation of non-existing UCS4 support functions.
2016-12-28 09:20:00 +02:00
Serhiy Storchaka
44223e9550
Issue #29087 : Removed the documentation of non-existing UCS4 support functions.
2016-12-28 09:19:45 +02:00
Serhiy Storchaka
af9181a4f2
Issue #29087 : Removed the documentation of non-existing UCS4 support functions.
2016-12-28 09:19:15 +02:00
Xiang Zhang
b211068f5c
Issue #28822 : Adjust indices handling of PyUnicode_FindChar().
2016-12-20 22:52:33 +08:00
Xiang Zhang
47888da90b
Issue #29009 : Merge 3.5.
2016-12-19 18:39:02 +08:00
Xiang Zhang
bfbc29cb8f
Issue #29009 : Remove outdated doc of PyUnicode_RichCompare.
2016-12-19 18:35:14 +08:00
Serhiy Storchaka
419967b832
Issue #28808 : PyUnicode_CompareWithASCIIString() now never raises exceptions.
2016-12-06 00:13:34 +02:00
Serhiy Storchaka
9a953dbb34
Issue #28808 : PyUnicode_CompareWithASCIIString() now never raises exceptions.
2016-12-06 00:17:45 +02:00
Serhiy Storchaka
01452af645
Issue #28750 : Fixed docs of of unicode-escape an raw-unicode-escape C API.
...
Patch by Xiang Zhang.
2016-11-20 17:21:04 +02:00
Serhiy Storchaka
cf36835fc5
Issue #28750 : Fixed docs of of unicode-escape an raw-unicode-escape C API.
...
Patch by Xiang Zhang.
2016-11-20 17:20:19 +02:00
Serhiy Storchaka
92b9a1f911
Issue #19569 : Suggested more appropriate replacements for deprecated Unicode
...
C API functions.
2016-11-20 12:14:08 +02:00
Serhiy Storchaka
f675a37ed3
Issue #19569 : Suggested more appropriate replacements for deprecated Unicode
...
C API functions.
2016-11-20 12:13:44 +02:00
Serhiy Storchaka
3b73ea1278
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:19:20 +02:00
Serhiy Storchaka
f4934ea77d
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:17:58 +02:00
Serhiy Storchaka
159f97b2d7
Issue #28496 : Mark up constants 0, 1 and -1 that denote return values or
...
special input values as literal text.
2016-10-27 21:42:15 +03:00
Serhiy Storchaka
1ecf7d204d
Issue #28496 : Mark up constants 0, 1 and -1 that denote return values or
...
special input values as literal text.
2016-10-27 21:41:19 +03:00
Serhiy Storchaka
989db5c880
Issue #19795 : Mark up None as literal text.
2016-10-19 16:37:13 +03:00
Serhiy Storchaka
ecf41da83e
Issue #19795 : Mark up None as literal text.
2016-10-19 16:29:26 +03:00
Berker Peksag
b8bddec4e0
Issue #28432 : Merge from 3.5
2016-10-17 00:46:37 +03:00
Berker Peksag
90e028970a
Issue #28432 : Fix first parameter name in PyUnicode_EncodeLocale documentation
...
Patch by Xiang Zhang.
2016-10-17 00:45:56 +03:00
Serhiy Storchaka
21d9f10c94
Merge from 3.5.
2016-10-08 22:46:01 +03:00
Serhiy Storchaka
9c0e1f83af
Issue #28379 : Added sanity checks and tests for PyUnicode_CopyCharacters().
...
Patch by Xiang Zhang.
2016-10-08 22:45:38 +03:00
Serhiy Storchaka
b3648576cd
Issue #28295 : Fixed the documentation and added tests for PyUnicode_AsUCS4().
...
Original patch by Xiang Zhang.
2016-10-02 21:30:35 +03:00
Serhiy Storchaka
cc164232aa
Issue #28295 : Fixed the documentation and added tests for PyUnicode_AsUCS4().
...
Original patch by Xiang Zhang.
2016-10-02 21:29:26 +03:00
Steve Dower
cc16be85c0
Issue #27781 : Change file system encoding on Windows to UTF-8 (PEP 529)
2016-09-08 10:35:16 -07:00
Benjamin Peterson
47ff0734b8
more PY_LONG_LONG to long long
2016-09-08 09:15:54 -07:00
Brett Cannon
a571120410
Issue #27182 : Add support for path-like objects to PyUnicode_FSDecoder().
2016-09-06 19:36:01 -07:00
Brett Cannon
ec6ce879c7
Issue #26027 : Support path-like objects in PyUnicode-FSConverter().
...
This is to add support for os.exec*() and os.spawn*() functions. Part
of PEP 519.
2016-09-06 15:50:29 -07:00
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
2016-09-05 17:44:18 -07:00
Berker Peksag
544ae59b8e
Issue #18353 : Remove PyUnicode_WRITE_CHAR macro link from c-api/unicode.rst
...
Patch by Corey Brune.
2016-04-24 03:06:44 +03:00
Serhiy Storchaka
6a7b3a77b4
Issue #26778 : Fixed "a/an/and" typos in code comment and documentation.
2016-04-17 08:32:47 +03:00
Martin Panter
20d325574e
Issue #15984 : Correct PyUnicode_FromObject() and _FromEncodedObject() docs
2016-04-15 00:56:21 +00:00