Transform text input to valid US-ASCII before sending via API