Add more discussion.
This commit is contained in:
parent
35daf4cb35
commit
ba7f822765
|
@ -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
|
||||
==========
|
||||
|
|
Loading…
Reference in New Issue