Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Diacritics (accent characters) getting stripped on form post

Diacritics (accent characters) getting stripped on form post

Scheduled Pinned Locked Moved Web Development
phphtmldatabasecomregex
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark J Miller
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • M Mark J Miller

      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

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      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.'

      M 1 Reply Last reply
      0
      • S Shog9 0

        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.'

        M Offline
        M Offline
        Mark J Miller
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups