p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: Problem with Windows Character Set

Message #1 by Brad Mellen-Crandell - HQ <bmellen-crandell@c...> on Fri, 1 Mar 2002 14:33:38 -0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

Content-Type: text/plain;

I have a form that collects data to be inserted into a database. If one of
my users cuts & pastes a message from a MS app into a textbox using IE, the
special characters are inserted into the database as character codes. 
User Enters: "This is a test" of the 'thingy' -I need to have it not screw
!@# up. 
I Get This: 
&#8220;This is a test&#8221; of the &#8216;thingy&#8217; &#8212;I need to
have it not screw !@# up. 
 I have isolated the problem to this: When users copy and paste from a
Microsoft app to my form in IE, IE retains characters from the Windows
Character Set (windows-1252). When the data gets submitted to the database,
the character codes are going in, not the character. In Netscape, as soon as
the user cuts and pastes, the characters appear to be converted to HTML
encoding (example: " (&#8220;) gets converted to "(&quot;).
Is there a way to prevent IE from retaining the windows-1252 character set,
or a way to convert any windows-1252 codes to iso-8859-1, or any other
solution you can think of?

Thanks, Brad

  Return to Index