CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Aug 2002
    Location
    Reykjavik, Iceland
    Posts
    201

    Question Weeding out UTF-8 characters using JavaScript

    There is a bug happening on my application for IE users if they cut and paste UTF-8 characters, such as the "smart quote" used by Microsoft Word, into a form field and then submit the form.

    Because IE has a bug in that it will not send the form data correctly when these UTF-8 characters are present, it results in an application exception.

    I was wondering if it is possible in JavaScript to detect these UTF-8 characters in the form elements in an onSubmit function and either remove them from the string or replace with an approximation. For example, if I come across the "opening smart double quote" I would replace with a standard double quote.

    Can you detect these special characters using JavaScript?
    Last edited by websmith99; October 21st, 2002 at 01:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured