Diacritics (accent characters) getting stripped on form post
-
I have a classic asp application which allows the use of diacritics (accented characters). The values containing the characters are being passed between a series of pages (wizard pattern) until the user submits the final page. As I inspect each page in the flow, the diacritics are being passed correctly between all the previous pages. But on the final submit the entire characters are being stripped from the value submitted. So, "Producciòn" becomes "Produccin". I'm just using request.form("....") to retrieve the values. The page headers are all the same (same includes same html head settings). Why would the characters be dropped?
Code responsibly: OWASP.org Mark's blog: developMENTALmadness.blogspot.com
-
I have a classic asp application which allows the use of diacritics (accented characters). The values containing the characters are being passed between a series of pages (wizard pattern) until the user submits the final page. As I inspect each page in the flow, the diacritics are being passed correctly between all the previous pages. But on the final submit the entire characters are being stripped from the value submitted. So, "Producciòn" becomes "Produccin". I'm just using request.form("....") to retrieve the values. The page headers are all the same (same includes same html head settings). Why would the characters be dropped?
Code responsibly: OWASP.org Mark's blog: developMENTALmadness.blogspot.com
Are they being dropped prior to submission (check the values in the form fields), during submission (check the actual POST with Fiddler or equiv), or during receipt (examine the request server-side; if you're doing ASP.NET, then the raw request is available somewhere in the current HttpContext object i believe, but poke around a bit). My first guess would be that you have the encoding set incorrectly on the last page, causing the browser to "correct" the characters... but a bit of detective work should take you a lot further than that. ;)
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
Are they being dropped prior to submission (check the values in the form fields), during submission (check the actual POST with Fiddler or equiv), or during receipt (examine the request server-side; if you're doing ASP.NET, then the raw request is available somewhere in the current HttpContext object i believe, but poke around a bit). My first guess would be that you have the encoding set incorrectly on the last page, causing the browser to "correct" the characters... but a bit of detective work should take you a lot further than that. ;)
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
Ok, a co-worker was able to help me. The issue was most definately an encoding issue as was stated. I believed that was the case, but had been changing the encoding on the referring and target pages w/o any luck. As it turns out I had to change the encoding on every page in the process and that fixed the problem. Here's the page that saved my hide: http://www.hanselman.com/blog/InternationalizationAndClassicASP.aspx [^] Before the changes, this is the value that was passed between the pages:
departmentname=Bo%F1ar+-+Producci%F3n
now the value being passed is:departmentname=Bo%C3%B1ar+-+Producci%C3%B3n
I appreciate the help given, thank you!Code responsibly: OWASP.org Mark's blog: developMENTALmadness.blogspot.com