Add more discussion.

This commit is contained in:
Martin v. Löwis 2009-04-30 09:24:24 +00:00
parent 35daf4cb35
commit ba7f822765
1 changed files with 9 additions and 1 deletions

View File

@ -106,6 +106,9 @@ also. Encoding the data with the locale's encoding and the (default)
strict error handler will raise an exception, encoding them with UTF-8
will produce non-sensical data.
Data obtained from other sources may conflict with data produced
by this PEP. Dealing with such conflicts is out of scope of the PEP.
For most applications, we assume that they eventually pass data
received from a system interface back into the same system
interfaces. For example, an application invoking os.listdir() will
@ -134,6 +137,11 @@ from which the encoder would create the desired bytes. In fact, with
python-escape, there are required byte sequences which cannot be
generated from replacement Unicode.
A few alternative approaches have been proposed:
* create a new string subclass that supports embedded bytes
* use different escape schemes, such as escaping with a NUL
character, or mapping to infrequent characters.
References
==========