Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   getline & non-ASCII characters, is there a way out? (http://www.go4expert.com/forums/getline-ascii-characters-t9096/)

vlpavlov 29Feb2008 14:25

getline & non-ASCII characters, is there a way out?
 
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

technosavvy 6Mar2008 10:33

Re: getline & non-ASCII characters, is there a way out?
 
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...!


All times are GMT +5.5. The time now is 18:38.