Is there a standard way to do an fopen with a unicode string file path?

Brian R. Bondy picture Brian R. Bondy · Dec 28, 2008 · Viewed 12.2k times · Source

Is there a standard way to do an fopen with a unicode string file path?

Answer

rob picture rob · Dec 28, 2008

In *nix, you simply use the standard fopen (see more information in reply from TokeMacGuy, or in this forum) In windows, you can use _wfopen, and then pass a unicode string (for more information, see MSDN).

As there is no real common way, I would wrap this call in a macro, together with all other system-dependent functions.