Create a utf8 file in linux in c programing
I have to create a utf8 file (say utf8_test.txt)  in linux (Ubuntu), in c.
I tried fopen(), but it create hte file depending on the Locale - as the locale was en_IN, it created in Ascii I guess.

Is there any interface or function by which I can specify the format of the file to open or I need to add some byte in the beginning of the file, so that the OS understands that it is a UTF8 file?

Please give your valuable inputs.

Thank you.


 

Create a utf8 file in linux in c programing
===

I have to create a utf8 file (say utf8_test.txt)  in linux (Ubuntu), in c.
I tried fopen(), but it create hte file depending on the Locale - as the locale was en_IN, it created in Ascii I guess.

Is there any interface or function by which I can specify the format of the file to open or I need to add some byte in the beginning of the file, so that the OS understands that it is a UTF8 file?

Please give your valuable inputs.

Thank you.


 
