## Unicode paths and Launch

Please post support and help requests here.
rsilvergun
Posts: 3
Joined: 12 Nov 2012, 02:16

### Unicode paths and Launch

Hi all,

Can I use Poco::Process::launch() with unicode file paths like so:

Poco::Pipe outPipe;
ProcessHandle myPH = Poco::Process::launch("C:\temp\\私\\hello.exe", args, 0, &outPipe, 0);

Poco::PipeInputStream istr(outPipe);
std::ofstream ostr("c:\\temp\\poco_processes.txt");
Poco::StreamCopier::copyStream(istr, ostr);

This works if I take out the '私' (japanese character 'Watashi'), but blows up in my copy of Visual C++ with it. I'm trying to support users of my app that have unicode in their paths / usernames, and I was hoping to use poco to make it nice and cross platform Thanks again!

guenter
Posts: 1185
Joined: 11 Jul 2006, 16:27
Location: Austria

### Re: Unicode paths and Launch

You can use Process::launch() with Unicode (UTF-8) paths. However, you cannot specify a UTF-8 path in a string literal with Visual C++ 2008 or newer even if your source file is UTF-8 encoded (http://stackoverflow.com/questions/6887 ... ual-c-2008). You'll have to put the path into a configuration file and read it from there, or properly UTF-8 encode your string using escape sequences.

rsilvergun
Posts: 3
Joined: 12 Nov 2012, 02:16

### Re: Unicode paths and Launch

Thanks . I wanted to be sure it would work before I played around with the unicode .

### Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests