Boost logo

Boost Users :

Subject: Re: [Boost-users] [filesystem] how to get wstring value from wpath::external_file_string() with gcc?
From: Sachin Garg (schngrg_at_[hidden])
Date: 2010-02-10 10:14:41


On Wed, Feb 10, 2010 at 4:16 PM, Igor R <boost.lists_at_[hidden]> wrote:
>> On windows, with my visual studio project settings set to "Unicode
>> character set", it correctly returns a wstring. But on OSX (using xcode/gcc) it tries to return a string.
>
> Maybe OSX uses UTF-8 unicode, that's why you get std::string?

You are right that default application tries to use UTF-8 unicode to
communicate with OS, I want to make it use wide-character. Visual
Studio provides an option to choose this for windows, I am just not
familiar enough with OSX/xcode.

The real problem is that wpath::external_file_string() fails on osx.
It throws an exception trying to convert from wchar_t to char saying
'invalid argument'. And I can't track down why.

SG


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net