htmlquery
htmlquery

Reputation: 1

HTML form submission with special characters

I am trying to submit a form field whose value is Transaction ID - sample . When the date gets submitted the value is Transaction ID ? sample

How do I get rid of the ?

I used HTML special codes for dash/long dash/short dash but still value gets submitted as ?

Please help

Upvotes: 0

Views: 4484

Answers (1)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201588

The only way to ensure that all input characters get sent correctly is to use UTF-8 character encoding for the form data. This happens automatically if the page containing the form is UTF-8 encoded (and declared to be that); otherwise, use the parameter accept-charset=utf-8 in the form data.

Naturally, you form handler must then be prepared to handling UTF-8 encoded data.

Upvotes: 1

Related Questions