Hi,
I don't know if I should put this questions in the HTML forum or here, but i'll try here first.
I have a problem with my charsets for French characters like é, è, ç, à, ....
I have an HTML template which uses a form and a post method. I've set the charset of the page to "ISO-8859-1" and the charset of the form to "UTF-8".
What happens is the following:
The template is read in by a servlet to replace certain tags. The contentType for this servlet is set to "ISO-8859-1". So when the doGet of the servlet is called, the template is read in and the tags are replaced by database values (Oracle with following settings: NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1). These database values are filled in as the values for the HTML textboxes of the form.
When I the the submit button (POST), the values are truncated.
For example:
- the initial database value is François.
- While laoding the page it will be displayed as François in the textbox
- When hitting the submit button (POST), it will change to Fran. It's truncated!!
What the problem seems to be is that is send the HTTP request as 1 byte instead of 2 bytes for the letter é, I get %E9 instead of %C9%A9. If I set it in the URL like this, it works but i can't get it to be like this when hitting the button.
Does anybody know how to fix this. I've tried all possible combinations of different charset, searched the internet and nothing helped.
Thanks very much
Tijs
I don't know if I should put this questions in the HTML forum or here, but i'll try here first.
I have a problem with my charsets for French characters like é, è, ç, à, ....
I have an HTML template which uses a form and a post method. I've set the charset of the page to "ISO-8859-1" and the charset of the form to "UTF-8".
What happens is the following:
The template is read in by a servlet to replace certain tags. The contentType for this servlet is set to "ISO-8859-1". So when the doGet of the servlet is called, the template is read in and the tags are replaced by database values (Oracle with following settings: NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1). These database values are filled in as the values for the HTML textboxes of the form.
When I the the submit button (POST), the values are truncated.
For example:
- the initial database value is François.
- While laoding the page it will be displayed as François in the textbox
- When hitting the submit button (POST), it will change to Fran. It's truncated!!
What the problem seems to be is that is send the HTTP request as 1 byte instead of 2 bytes for the letter é, I get %E9 instead of %C9%A9. If I set it in the URL like this, it works but i can't get it to be like this when hitting the button.
Does anybody know how to fix this. I've tried all possible combinations of different charset, searched the internet and nothing helped.
Thanks very much
Tijs