Here is some REALbasic code that does this, and it's probably reasonably quick.

Function RemoveDoubleByte(inString as String) as String
  #pragma disableBackgroundTasks

  dim characters() as String = Split(inString, "")
  For i as Integer = 0 to UBound(characters)
    If Asc(characters(i)) > 127 then
      characters(i) = "?"
    End if
  Next
Return Join(characters, "") //you might want to change the encoding to ASCII here
End Function

At <http://www.declaresub.com/Code/index.html> there is a button that will allow you to pay me via Paypal.

Charles Yeomans

On Mar 26, 2006, at 5:07 PM, Sven E Olsson wrote:


Hi,
I need (and many others I think) an simple function (plugin)
written in Quick C. (or was it Basic?)

Like this:

OutString = RemoveDoubleByte(inString)

    mx = len(nStr)
    for x = 1 to mx
      ch = mid(nstr,x,1)
      if Asc(ch) > 127 then
        s = s + "?"
      else
        s = s + ch
      end if
    next x


The string is from 1KB to 500KB...
Are there any plugin writers that could fix this.
If so contact me off list for an deal.

_______________________________________________
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