Loading ...
Sorry, an error occurred while loading the content.

Problem with setForm and ®

Expand Messages
  • hondo522
    Hello, I have a form that I am using setForm on. When one of the fields has a ® in it, set form is adding an extra special character to the value. Value
    Message 1 of 2 , Apr 28, 2009
    • 0 Attachment
      Hello,

      I have a form that I am using setForm on. When one of the fields has a ® in it, set form is adding an extra special character to the value.

      Value Result of setForm() Resulting value
      ===============================================
      Levis® => Levis%C2%AE => Levis®

      Any thoughts?

      Thanks,
      Matt
    • tssha
      ... The name and field values are encoded via encodeURIComponent, before the data are submitted. The encoding produces the byte pair %C2%AE to represent the
      Message 2 of 2 , Apr 29, 2009
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "hondo522" <crist.m@...> wrote:
        >
        > Hello,
        >
        > I have a form that I am using setForm on. When one of the fields has a ® in it, set form is adding an extra special character to the value.
        >
        > Value Result of setForm() Resulting value
        > ===============================================
        > Levis® => Levis%C2%AE => Levis®
        >
        > Any thoughts?

        The name and field values are encoded via encodeURIComponent, before the data are submitted. The encoding produces the byte pair %C2%AE to represent the trademark symbol. At what point are you seeing the value displayed with the circumflex A? What encoding are you using to display the value?

        Regards,
        Thomas
      Your message has been successfully submitted and would be delivered to recipients shortly.