1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

getline & non-ASCII characters, is there a way out?

Discussion in 'C' started by vlpavlov, Feb 29, 2008.

  1. vlpavlov

    vlpavlov New Member

    Joined:
    Feb 20, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    hello 2 all

    i wander how to get characters from plain text file that are not ASCII, eg ć š đ č, also german letters .... .. . and put them in array of 200 characters

    any ideas

    ?

    thanx
     
  2. technosavvy

    technosavvy New Member

    Joined:
    Jan 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    what u can do is open the file in binary mode and read it using fread...
    hence u will be able to retrieve everything...

    the problem u have is because of characters which are non ASCII...like german characters that u r talking about comes in UNICODE character set...so if u have a corresponding function which can read UNICODE characters then ur job is done..

    nd even in the case when u use fread to read the complete file..u won't be really use the character until u have a char which is more than one byte long...!
     

Share This Page