On Mar 27, 2006, at 2:09 , Jonathan Johnson wrote:


On Mar 26, 2006, at 4: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.

What happens if you just ConvertEncoding( theString, Encodings.ASCII )?

-Jon


Hi Jon and Charles.....

It does that i wanted, until ... i found that some characters is not converted to an ? ...
Perhaps four bytes char that be two byte??

So it works to 90% ... but then it fails...


I should test Charles function....

Thx to you both!

Sven E



_______________________________________________
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