A quick follow-up question:

Converting from the Folderitem to the shellpath:

(source as folderitem)

  dim s, sneu as string
  s = source.ShellPath.ConvertEncoding(Encodings.UTF8)

  for i as integer = 0 to lenb(s)
    dim t as integer = midb(s,i,1).ascb
    if t > 127 then
      sneu = sneu + "\"+Oct(t)
    else
      sneu = sneu + midb(s,i,1)
    end if
  next

I am obviously doing something wrong here, because the shell is still not recognizing this path...
Thanks,
Michael



Am 13.01.2006 um 20:39 schrieb Alexander Cohen:

Youre a genius, thanks a million!

Alex

On 13-Jan-06, at 1:34 PM, Joseph J. Strout wrote:

At 1:10 PM -0500 1/13/06, Alexander Cohen wrote:

When i get a shellPath for a file containing an 'É', the shellPath contains 'e\314\201'. Does anyone know of a way to convert from and to these two strings?

What you see in the ShellPath is, I believe, the octal representation of the bytes. So take your 314 and 201, convert them from octal into integers, and use ChrB to convert them into strings and stuff them into the appropriate place in your converted string. Then, when done, remember to use DefineEncoding to let RB know that this pasted-together bunch of bytes is really UTF-8 text.

To go in the other direction, scan your UTF-8 string with AscB, and take any byte beyond the ASCII range (0-127) and represent it as octal.

Best,
- Joe

--

Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
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>

_______________________________________________
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>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to