ocw/utils.py
def _force_unicode(s, encoding='utf-8'):
    '''
    If the input is bytes, convert to unicode, otherwise return the input
    '''
    if hasattr(s, 'decode'):
        s = s.decode(encoding=encoding)

    return s

    If the input is bytes, convert to unicode, otherwise return the input
    
If the input is bytes, convert to unicode, otherwise return the input
If the input is bytes convert to unicode otherwise return the input
def _force_unicode(s, encoding='utf-8'):
    if hasattr(s, 'decode'):
        s = s.decode(encoding=encoding)
    return s
def _force_unicode ( s , encoding = 'utf-8' ) : if hasattr ( s , 'decode' ) : s = s . decode ( encoding = encoding ) return s
If the input is bytes, convert to unicode, otherwise return the input
If the input is bytes convert to unicode otherwise return the input
'''
    If the input is bytes, convert to unicode, otherwise return the input
    '''
s
encoding