High ASCII to standard ASCII???

Results 1 to 2 of 2

Thread: High ASCII to standard ASCII???

  1. #1
    Brian Hogan Guest

    Default High ASCII to standard ASCII???

    Okay my problem is that when ever I paste text from Word into a textarea, the formatting is all screwed up. In other words, some of Words ASCII codes are way different from standard ASCII. Does anyone know of any code that will allow me to convert the high level ASCII to standard ASCII. Example, Word has an opening and closing double quote... In standard ASCII there is only one single double quote. Same kind of thing with single quotes. If anybody has worked with TEXTAREA&#039s and saving it&#039s content to a Database, then they probably will know what I&#039m dealing with. Please help me out.<BR><BR>later,<BR>Brian Hogan<BR>bhogan@ehovland.com

  2. #2
    BalletChick Guest

    Default RE: High ASCII to standard ASCII???

    This should be pretty simple. Just AND everything with 127 (decimal).<BR><BR>For example (assuming your original data is in the variable strData):<BR><BR>strNewData = ""<BR>for intX = 1 to len(strData)<BR>&nbsp;&nbsp;&nbsp;strNewData = strNewData & chr(asc(mid(strData, intX, 1)) and 127)<BR>next<BR><BR>Does that help?<BR><BR>

Posting Permissions

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