[Patches] [ python-Patches-435971 ] Adds a UTF-7 codec
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 20 Sep 2001 03:36:49 -0700
Patches item #435971, was opened at 2001-06-24 19:57
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=435971&group_id=5470
Category: Core (C code)
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Adds a UTF-7 codec
Initial Comment:
This code adds UTF-7 (as described in RFC2152) support
to Python.
The encoder is hardwired in _codecsmodule.c to not
encode allowable whitespace and set O characters (see
RFC2152). If there is a standardized way (keyword
arguments?) of passing optional arguments to encode
methods, it would be trivial to make it possible to do
so.
Otherwise the patch is pretty straight-forward, I
think. It touches:
Objects/unicodeobject.c
Modules/_codecsmodule.c
Lib/test/test_unicode.py
Include/unicodeobject.h
and adds a new file:
Lib/encodings/utf_7.py
----------------------------------------------------------------------
>Comment By: M.-A. Lemburg (lemburg)
Date: 2001-09-20 03:36
Message:
Logged In: YES
user_id=38388
I've checked in the patch. Please upload the updates you have in mind as new patch. Thanks.
----------------------------------------------------------------------
Comment By: Brian Quinlan (bquinlan)
Date: 2001-08-10 18:19
Message:
Logged In: YES
user_id=108973
Have you had a chance to review this patch yet?
If it looks ok to you then I will update it to include an
optional arguments specifying if set O characters should be
encoded. I'll also make it work with 32-bit unichars.
Otherwise I won't bother because I don't need that for my
own use.
----------------------------------------------------------------------
Comment By: Brian Quinlan (bquinlan)
Date: 2001-06-25 11:10
Message:
Logged In: YES
user_id=108973
OK, I see the utf-16 example. In a few weeks, when I have
some time again, I might do the necessary changes and
testing. It might even be nice to be able to specify a list
of characters to escape, if they are dangerous for your
application (of maybe it's just morning featuritis :-)).
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2001-06-25 04:24
Message:
Logged In: YES
user_id=38388
encode functions can have optionl arguments (see for example
the utf-16 codec or the charmap codec). They don't need to
be keyword arguments although this would make them easier to
handle in case we should ever want to change the API.
I'll look at the patch more closely later this week or
today.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=435971&group_id=5470