There is a file on my hard drive that contains the character "ö" - an 'o' with umlauts above it. When the filename enters VB, either cut and pasted into the IDE or any control in my application, or listed in a filelist box, or (the most relevant) read from an IShellFolder name enumeration (with both the SHGDN_INFOLDER flag and the SHGDN_FORPARSING flag) and displayed in a listview, it's split into 2 characters.
Another weird aspect to this is if it's pasted into a label edit on the listview, it shows as one character until the label edit is complete, THEN splits into 2 characters. And when it's pasted from VB and back into Explorer, it remains as 2 separate characters.
Now this is causing a major problem, as any operations end with a File Not Found error since it's looking for the 2 character file. It's not just a display issue, it's whenever it enters a VB string, eg:
orig=pathfrompidl, or orig=isf.GetDisplayNameOf(relativepidl)
new=orig & "2"
Name orig As new
results in file not found.
What gives?? And how might I go about working around this issue?
Edit: I considered it might having something to do with Unicode, so I tried the following:
orig=SHGetPathFromIDListW
new="a" & orig
MoveFileWithProgressW(orig,new...)
But to no avail. MoveFileWithProgress returned 0 (failed), but then GetLastError (API function, according to MSDN's entry on MFWP should return the error code) also returned 0... but I'm assuming it was not found that way either. Sorry for the pseudocode but the main point is I'm moving it directly from the IShellFolder.GetDisplayNameOf or SHGetPathFromIDListW function, appending a single character, then going directly to MoveFile while debugging this-- no controls involved at this point.
This is what is being passed to MoveFileWithProgressW:
http://img593.imageshack.us/img593/2379/errortr.jpg
