unicode folderitem.Shellpath

From what Greg says, the difference between Command Prompt and Shell is that Shell does not have the environment variables cmd inherits.

But I am not too sure which one would be missing. From what I can tell by comparing the output of the command set from Command Prompt and from shell, all environment variables check out.

Apparently, it is impossible to set environment variables from within the shell. It simply does not do anything.

At this point, I have to admit there seems to be no way to go around the limitations. Unless… Have you tried to create a batch file called for instance test.bat with inside

cd C:\\DOCUME~1\\Eric\\??\\folder

and run it from shell as

s.execute("cmd /c test")

With some luck, cmd will understand better called that way.

I realize I already made the batch suggestion above. But that is really the very last idea I have.

If that did not work, since apparently specialfolder.desktop does work fine, maybe you want to refactor your code to do what you need to do from within Xojo instead of shell. If that was not possible, then it looks as the Kobayashi Maru…

I’m performing a database backup so I need to run the set some variables, and run the pg_dump executable with arguments and a path.

Good luck !

Here’s a wild guess, but have you enabled “Canonical” on the shell (theShell.Canonical = True)? The setting enables special characters in the shell, so it may have an unexpected affect of allowing the Unicode characters to be processed properly.

Lee, did you found a solution for this?

I am struggling with the same issue. Its not only for chinees chars, for example French characters like and have the same issue.

Not really.

theShell.Canonical = True

Made no difference.

Normal shell paths work fine, even those with other characters in them.

C:\\Users\\MYUSER\\Documents\\????\\l
C:\\Users\\MYUSER\\Documents\\caf\\

The shell path is the same and works fine.

Lee