SetEnvironmentVariable with non-ascii chars


2004-01-08 09:17:58 PM
delphi71
Hi all,
I have a strange problem to do with non-ascii characters in filenames. My
app runs a seperate process (exe) to generate certain output files. The
main app communicates the directory to place these in through a Windows
environment variable. The problem arises with use of non-ascii codes in
directory names.
The code to create the E.V. is:
StrPCopy(zOutputDir, FOutPath);
SetEnvironmentVariable('OUTPATH', zOutputDir);
When, for example, FOutPath is set to "c:\output", all is fine.
However, if it is set to "C:\out?, when I check from the other process
side, OUTPATH shows up as "c:\out,\".
Perhaps I need to use the DOS equivalent pathname (not sure how to do this
though)?