summaryrefslogtreecommitdiff
path: root/Include/unicodeobject.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | Improve string forms and PyUnicode_Resize() documentationVictor Stinner2011-10-031-13/+22
| | | | | | | | | | Remove also the FIXME for resize_copy(): as discussed with Martin, copy the string on resize if the string is not resizable is just fine.
* | _PyUnicode_CheckConsistency() checks utf8 field consistencyVictor Stinner2011-10-031-0/+2
| |
* | PyUnicode_Ready() now sets ascii=1 if maxchar < 128Victor Stinner2011-10-031-16/+25
| | | | | | | | | | ascii=1 is no more reserved to PyASCIIObject. Use PyUnicode_IS_COMPACT_ASCII(obj) to check if obj is a PyASCIIObject (as before).
* | Add _PyUnicode_CheckConsistency() macro to help debuggingVictor Stinner2011-10-031-0/+46
| | | | | | | | | | | | * Document Unicode string states * Use _PyUnicode_CheckConsistency() to ensure that objects are always consistent.
* | PyUnicode_READ_CHAR() ensures that the string is readyVictor Stinner2011-10-021-8/+10
| |
* | Use Py_UCS1 instead of unsigned char in unicodeobject.hVictor Stinner2011-10-021-2/+2
| |
* | PyUnicode_WriteChar() raises IndexError on invalid indexVictor Stinner2011-10-021-1/+3
| | | | | | | | | | PyUnicode_WriteChar() raises also a ValueError if the string has more than 1 reference.
* | _PyUnicode_AsKind() is *not* part of the stable ABIVictor Stinner2011-10-011-0/+2
| |
* | PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()Victor Stinner2011-10-011-2/+5
| |
* | Add PyUnicode_Copy() function, include it to the public APIVictor Stinner2011-09-301-0/+5
| |
* | _PyUnicode_Ready() cannot be used on ready strings anymoreVictor Stinner2011-09-291-7/+9
| | | | | | | | | | | | * Change its prototype: PyObject* instead of PyUnicodeoObject*. * Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready) must be checked instead
* | Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.hVictor Stinner2011-09-291-10/+0
| | | | | | | | Move these macros to unicodeobject.c
* | Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null characterVictor Stinner2011-09-291-3/+5
| | | | | | | | Cleanup also the code (avoid the goto).
* | PyUnicode_CopyCharacters() fails if 'to' has more than 1 referenceVictor Stinner2011-09-281-1/+2
| |
* | Mark _PyUnicode_FindMaxCharAndNumSurrogatePairs() as privateVictor Stinner2011-09-281-12/+0
| |
* | Strip trailing spaces in unicodeobject.[ch]Victor Stinner2011-09-281-5/+5
| |
* | PyUnicode_CopyCharacters() checks for buffer and character overflowVictor Stinner2011-09-281-3/+15
| | | | | | | | It now returns the number of written characters on success.
* | Mark PyUnicode_CONVERT_BYTES as privateVictor Stinner2011-09-281-15/+0
| |
* | Set Py_UNICODE_REPLACEMENT_CHARACTER type to Py_UCS4, instead of Py_UNICODEVictor Stinner2011-09-281-1/+1
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-264/+519
| |
* | Merge 3.2: Fix PyUnicode_AsWideCharString() docVictor Stinner2011-09-061-1/+1
|\ \ | |/ | | | | | | | | - Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character - Fix spelling of the null character
| * Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null characterVictor Stinner2011-09-061-1/+1
| | | | | | | | Fix also spelling of the null character.
* | #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, ↵Ezio Melotti2011-08-221-0/+9
| | | | | | | | Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES.
* | Issue #9642: Uniformize the tests on the availability of the mbcs codecVictor Stinner2011-07-041-2/+6
| | | | | | | | Add a new HAVE_MBCS define.
* | Remove useless argument of _PyUnicode_AsDefaultEncodedString()Victor Stinner2011-03-021-2/+1
|/
* Issue #9738: Ooops, fix typos in my previous commit (r87506)Victor Stinner2010-12-271-1/+1
|
* Issue #9738: document encodings of unicode functionsVictor Stinner2010-12-271-5/+7
|
* Take PyUnicode_TransformDecimalToASCII out of the limited API.Georg Brandl2010-12-051-0/+2
|
* Issue #10557: Fixed error messages from float() and other numericAlexander Belopolsky2010-12-041-0/+11
| | | | | | types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents.
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+61
|
* Issue #10413: Updated comments to reflect code changesAlexander Belopolsky2010-11-161-18/+13
|
* Issue #8761: Mangle PyUnicode_CompareWithASCIIString function name forVictor Stinner2010-10-241-2/+2
| | | | narrow/wide unicode build.
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-1/+1
|
* Use locale encoding if Py_FileSystemDefaultEncoding is not setVictor Stinner2010-10-151-3/+6
| | | | | | | | * PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
* PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*Victor Stinner2010-10-071-1/+1
| | | | | All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the prototype for the new function PyUnicode_AsWideCharString().
* Issue #9979: Create function PyUnicode_AsWideCharString().Victor Stinner2010-09-291-2/+17
|
* #9210: remove --with-wctype-functions configure option.Amaury Forgeot d'Arc2010-09-121-36/+1
| | | | | | | | The internal unicode database is now always used. (after 5 years: see http://mail.python.org/pipermail/python-dev/2004-December/050193.html )
* Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error onVictor Stinner2010-09-111-2/+8
| | | | | | a non-ASCII byte in the format string. Document also the encoding.
* Rename PyUnicode_strdup() to PyUnicode_AsUnicodeCopy()Victor Stinner2010-09-031-1/+1
|
* Create PyUnicode_strdup() functionVictor Stinner2010-09-011-1/+10
|
* Create Py_UNICODE_strcat() functionVictor Stinner2010-09-011-0/+3
|
* Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()Antoine Pitrou2010-09-011-12/+0
| | | | | are now removed, since their effect was inexistent in 3.x (the default encoding is hardcoded to utf-8 and cannot be changed).
* #5127: Even on narrow unicode builds, the C functions that access the UnicodeAmaury Forgeot d'Arc2010-08-181-58/+22
| | | | | | | | | | Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept and return characters from the full Unicode range (Py_UCS4). The differences from Python code are few: - unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit() now return the correct value for large code points - repr() may consider more characters as printable.
* Issue #9425: Create Py_UNICODE_strncmp() functionVictor Stinner2010-08-161-6/+21
| | | | | The code is based on strncmp() of the libiberty library, function in the public domain.
* Issue #9542: Create PyUnicode_FSDecoder() functionVictor Stinner2010-08-131-3/+9
| | | | | | | | | | | | It's a ParseTuple converter: decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is. * Don't specify surrogateescape error handler in the comments nor the documentation, but PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_EncodeFSDefault() because these functions use strict error handler for the mbcs encoding (on Windows). * Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid inconsistency with unicodeobject.h.
* Issue #9425: create Py_UNICODE_strrchr() functionVictor Stinner2010-08-101-0/+4
|
* #9078: fix some Unicode C API descriptions, in comments and docs.Georg Brandl2010-06-271-6/+6
|
* rephraseBenjamin Peterson2010-05-151-2/+2
|
* Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a UnicodeVictor Stinner2010-05-151-0/+10
| | | | | | object to Py_FileSystemDefaultEncoding with the "surrogateescape" error handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set, fall back to UTF-8.
* Issue #8711: Document PyUnicode_DecodeFSDefault*() functionsVictor Stinner2010-05-141-8/+12
| | | | | | | | | | * Add paragraph titles to c-api/unicode.rst. * Fix PyUnicode_DecodeFSDefault*() comment: it now uses the "surrogateescape" error handler (and not "replace") * Remove "The function is intended to be used for paths and file names only during bootstrapping process where the codecs are not set up." from PyUnicode_FSConverter() comment: it is used after the bootstrapping and for other purposes than file names