Boost logo

Boost :

Subject: Re: [boost] [nowide] Easy Unicode For Windows: Request For Comments/Preliminary Review
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-05-29 13:33:23


On Tue, May 29, 2012 at 7:19 PM, Alex Perry <Alex.Perry_at_[hidden]>wrote:

> Having done things similar to this before (if never with any elegance). I
> think that the above won't work in all situations.

You guessed the implementation incorrectly. Please see the sources. I've
always done it the way you said (with wmain/main), but this is why I said
that Artyom's solution is more elegant.

args doesn't even read the argc/argv arguments. It uses CommandLineToArgvW
and GetEnvironmentStringsW to get the wide strings from Windows, then
converts them to UTF-8 and assigns the pointer to it back to the local
parameters of main.

-- 
Yakov

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk