Bizarrely, I can't locate any code for REALbasic that converts  
   characters intended for a URL into HTML escape sequences as need be.  
   eg space into %20.

Here is my URL Quoting code:

------------------------------------------------------------
  ' quote the supplied string per URL quoting.  It only works for strings with 
8-bit characters.
  
  dim cnt as Integer = s.Len
  dim i as Integer
  dim ss as String = ""
  dim c as String
  dim ac as Integer
  if cnt > 0 then
    for i = 1 to cnt
      c = s.Mid(i, 1)
      ac = Asc(c)
      if c = " " then
        ss = ss + "+"
      elseif c = "=" or c = "+" or c = "%" or ac < 32 or ac > 126 then
        ss = ss + "%" + Fin.Hex2(ac)
      else
        ss = ss + c
      end
    next
  end
  return ss
------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to