wopen calls when porting to Linux
<p>I have an application which was developed under Windows, but for gcc. The code is mostly OS-independent, with very few classes which are Windows specific because a Linux port was always regarded as necessary. </p>

<p>The API, especially that which gets called as a direct result of user interaction, is using wide char arrays instead of char arrays (as a side note, I cannot change the API itself - at this point, std::wstring cannot be used). These are considered as encoded in UTF-16. </p>

<p>In some places, the code opens files, mostly using the windows-specific <code>_wopen</code> function call. The problem with this is there is no <code>wopen</code>-like substitute for Linux because Linux "only deals with bytes".</p>

<p>The question is: how do I port this code ? What if I wanted to open a file with the name "something™.log", how would I go about doing so in Linux ? Is a cast to char* sufficient, would the wide chars be picked up automatically based on the locale (probably not) ? Do I need to convert manually ? I'm a bit confused regarding this, perhaps someone could point me to some documentation regarding the matter.</p>
