dealing with UTF-8 file with C++

Discussion in 'C++' started by byang, Apr 16, 2008.

  1. byang

    byang Guest

    Hi,
    I am wondering how can read/write UTF-8 files with C++. Say, I know
    there is a file encoded with UTF-8, I am now wanting to change some
    character in the file. How can I achieve? Could anybody here to help on
    explaining some encoding issue?

    Thanks in advance!

    Regards!
    Bo
    byang, Apr 16, 2008
    #1
    1. Advertising

  2. byang

    Guest

    On Apr 16, 6:10 am, byang <> wrote:
    > Hi,
    > I am wondering how can read/write UTF-8 files with C++. Say, I know
    > there is a file encoded with UTF-8, I am now wanting to change some
    > character in the file. How can I achieve? Could anybody here to help on
    > explaining some encoding issue?
    >
    > Thanks in advance!
    >
    > Regards!
    > Bo


    Hello,

    You can use std::wstring and std::wfstream. Also this article may be
    helpful: http://evanjones.ca/unicode-in-c.html

    Regards.
    , Apr 16, 2008
    #2
    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. JJBW
    Replies:
    1
    Views:
    10,064
    Joerg Jooss
    Apr 24, 2004
  2. =?Utf-8?B?QXNoYQ==?=
    Replies:
    3
    Views:
    418
  3. Arifi Koseoglu
    Replies:
    2
    Views:
    953
    Arifi Koseoglu
    Apr 13, 2004
  4. moonhkt
    Replies:
    18
    Views:
    2,493
    Roedy Green
    Feb 5, 2010
  5. Kioko --
    Replies:
    3
    Views:
    281
    Walton Hoops
    Mar 24, 2010
Loading...

Share This Page