def _encode_text(name, value, dummy0, dummy1):
 value = _utf_8_encode(value)[0]
 return (((('\x02' + name) + _PACK_INT((len(value) + 1))) + value) + '\x00')

def _encode_text ( name , value , dummy0 , dummy1 ) : value = _utf_8_encode ( value ) [ 0 ] return ( ( ( ( '\x02' + name ) + _PACK_INT ( ( len ( value ) + 1 ) ) ) + value ) + '\x00' )
encode a python unicode / str .