def _a_encode_unicode(value, mapping):
 assert isinstance(value, unicode), ('VALUE has invalid type: %s' % type(value))
 value = value.encode('UTF-8')
 return (str(len(value)).encode('UTF-8'), 's', value)

def _a_encode_unicode ( value , mapping ) : assert isinstance ( value , unicode ) , ( 'VALUE has invalid type: %s' % type ( value ) ) value = value . encode ( 'UTF-8' ) return ( str ( len ( value ) ) . encode ( 'UTF-8' ) , 's' , value )
foo-bar --> .