[Patches] [ python-Patches-413333 ] Improved support for unicode conversions

noreply@sourceforge.net noreply@sourceforge.net
Mon, 02 Apr 2001 23:31:18 -0700


Patches item #413333, was updated on 2001-04-02 23:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=413333&group_id=5470

Category: core (C code)
Group: None
Status: Open
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improved support for unicode conversions

Initial Comment:
This patch is designed to increase the flexibility of 
the unicode conversion function. The proposed strategy 
is:

def unicode( val )
    if type( val ) == type.UnicodeType:
        return val
    else:
        return str_to_unicode( str( val ) )

This makes it possible to perform operations such as:

unicode( 5 ) => u'5'

without generating an exception.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=413333&group_id=5470