encode and decode text/morse