UNICODE variant of fopen or ofstream to be ANSI compliant.

Discussion in 'C++' started by mihai, Dec 8, 2005.

  1. mihai

    mihai Guest

    I need to open an file with an unicode name, and i cannot find an
    proper way to do this.

    Any help is appreciated.

    Thank you,
    Mihai.
    mihai, Dec 8, 2005
    #1
    1. Advertising

  2. mihai

    Guest

    mihai wrote:
    > I need to open an file with an unicode name, and i cannot find an
    > proper way to do this.


    Try passing the return of c_str() from a wstring to open. It is not in
    the current standard but may be in future versions and may or may not
    be implemented in your environment.
    , Dec 8, 2005
    #2
    1. Advertising

  3. mihai

    Guest

    wrote:
    > mihai wrote:
    > > I need to open an file with an unicode name, and i cannot find an
    > > proper way to do this.

    >
    > Try passing the return of c_str() from a wstring to open.


    fsteam::eek:pen that is.
    , Dec 8, 2005
    #3
  4. On 8 Dec 2005 08:44:43 -0800, "mihai" <> wrote:
    >I need to open an file with an unicode name, and i cannot find an
    >proper way to do this.


    You probably need to use a platform-specific function (e.g. Windows
    _wfopen).

    Best wishes,
    Roland Pibinger
    Roland Pibinger, Dec 8, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nonee
    Replies:
    2
    Views:
    2,651
    Neredbojias
    Oct 25, 2005
  2. ais523

    Is this code ANSI-compliant?

    ais523, Jan 23, 2006, in forum: C Programming
    Replies:
    9
    Views:
    409
    Grumble
    Jan 25, 2006
  3. Squid Seven

    ofstream * vs. ofstream

    Squid Seven, Jul 13, 2005, in forum: C++
    Replies:
    5
    Views:
    597
    Ivan Johansen
    Jul 14, 2005
  4. Replies:
    1
    Views:
    486
  5. Michel Rouzic
    Replies:
    4
    Views:
    1,832
    Michel Rouzic
    Apr 28, 2008
Loading...

Share This Page