Escaping characters

Results 1 to 2 of 2

Thread: Escaping characters

  1. #1
    Join Date
    Dec 1969

    Default Escaping characters

    I get a weekly export of records from a Filemaker database which I import into my Sql Server database. Each week I get different ASCII characters in my ASP pages which are pulling data from the database such as Æ Õ<BR><BR>I&#039;m using the Replace function to replace line breaks and paragraph breaks but I can&#039;t seem to find the right ascii code to replace the weird characters above. I&#039;ve tried chr(146), chr(198) etc. How do I find out what the character code is for these characters and replace them? Every ASCII reference I&#039;ve used doesn&#039;t seem to work. Thanks.<BR><BR>&#039;This formats the CompanyProfileRatings field so that the line breaks occur<BR>Function FormatHTML(sText)<BR> dim strReturn<BR> strReturn = Replace(sText, vbCrLf & vbCrLf, "&#060;P&#062;")<BR> strReturn = Replace(strReturn, vbCrLf, "<BR>")<BR> strReturn = Replace(strReturn, chr(11), "&#060;P&#062;")<BR> strReturn = Replace(strReturn, chr(146), "")<BR> FormatHTML = strReturn<BR>End function<BR>

  2. #2
    Join Date
    Dec 1969

    Default If you know where in the string...

    ...these "weird" characters are, you can do this to find out the ASCII code:<BR><BR>Response.Write "ASCII of " & Mid(sText, 10, 1) & ": " & Asc(Mid(sText, 10, 1))<BR><BR>Oliver.

Posting Permissions

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