1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

read wchar_t from text file

Discussion in 'C' started by juliaprocess, Aug 16, 2006.

  1. juliaprocess

    juliaprocess New Member

    Joined:
    Aug 16, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    hello
    let's say i type some spanish in a text file, how would i read them in as wchar_t type from a text file?
     
  2. Aztec

    Aztec New Member

    Joined:
    May 9, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    0
    Can you read a char from text file?
     
  3. juliaprocess

    juliaprocess New Member

    Joined:
    Aug 16, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    yeah, i have no problem reading a regular text file, the problem is when i start typin in different languages, i can't seem to store them
     
  4. Aztec

    Aztec New Member

    Joined:
    May 9, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    0
    You probably want to store the text in utf-16 or utf-8.
    Normally you'd write a byte order mark which most editors check for to see what encoding the file is in, then you write the encoded characters (wikipedia has information about both).
     

Share This Page