encode using base64 for unified-diff