__author = "Oyetoke Toby (CITGuru)"
__version = "0.1"

def fight_unicode(obj, *args):
    # this just return the unicode representation of obj
    try:
        return unicode(obj, *args)
    except UnicodeDecodeError:
        # obj is byte string
        ascii_text = str(obj).encode('string_escape')
        return unicode(ascii_text)

def fight_str(obj):
    # this just return the byte string representation of obj
    try:
        return str(obj)
    except UnicodeEncodeError:
        # obj is unicode
        return unicode(obj).encode('unicode_escape')
