Source

Mango / __init__.py

#!/usr/bin/python
# -*- coding: utf-8 -*-

VERSION = '0.5.3'

def utf8(text):
    """
    >>> utf8('✈')
    u'\u2708'
    >>> utf8(u'unicode')
    u'unicode'
    """
    return text if isinstance(text, unicode) else unicode(text, 'utf-8')