[Python-Dev] uPEP: encoding directive

Paul Prescod paul@prescod.net
Wed, 19 Jul 2000 12:32:38 -0500


Fredrik Lundh wrote:
> 
> paul wrote:
> > If we're going to restrict people to ASCII-like encodings, we
> > could just restrict them to ASCII and get it over with.
> 
> Sorry, you lost me there...  in what part(s) of the source file
> should we restrict users to pure ASCII?
> 
> (in string literals?  unicode string literals?  the entire script?)

The entire script. If we're going to require a Japanse user to use 3
bytes to encode some character then we might as well require them to use
backslash syntax.

I mean if we're going to be revolutionary, then we could take the XML
route.

 * require the encoding pragma to be the first line
 * auto-detect one-byte, two-byte based on #?
 * figure out precise encoding from directive

Otherwise, I'm not sure if we're making enough progress. Westerners
probably won't bother to put in the directive as long as their code
works fine without it.

-- 
 Paul Prescod - Not encumbered by corporate consensus
Just how compassionate can a Republican get before he has to leave the 
GOP and join Vegans for Global Justice? ... One moment, George W. Bush
is holding a get-to-know-you meeting with a bunch of gay Republicans.
The next he is holding forth on education or the environment ... It is
enough to make a red-blooded conservative choke on his spotted-owl
drumstick.     - April 29th, Economist