How to save the text file in the unicode

Hi experts


I want to know how to store the containts of the txt file to
the unicode character please give reply

Regards,
ram
Output the Unicode magic number and then the Unicode values ( in binary format )
Unicode magic number
The what now? You mean the byte order mark? That's only needed when you're writing UTF-16 and bigger encodings.
I think he wants to read a file.
No I just want to write the containts as a unicode?
Last edited on
Ah, then first convert your string to a unicode representation and then just write() it to file.
Read more about Unicode encodings here (UTF-8, UTF-16, and UTF-32):
http://en.wikipedia.org/wiki/Unicode

The iconv library is designed to convert between encodings for you. Check it out.
http://www.gnu.org/software/libiconv/

Good luck!
Topic archived. No new replies allowed.