Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   read wchar_t from text file (http://www.go4expert.com/forums/read-wchart-text-file-t1220/)

juliaprocess 16Aug2006 22:57

read wchar_t from text file
 
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?

Aztec 17Aug2006 00:57

Re: read wchar_t from text file
 
Can you read a char from text file?

juliaprocess 17Aug2006 07:47

Re: read wchar_t from text file
 
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

Aztec 19Aug2006 11:04

Re: read wchar_t from text file
 
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).


All times are GMT +5.5. The time now is 23:14.