سؤال

how can i add Byte order mark (BOM) to output file using C?

my output file is ANSI as UTF-8 (which mean UTF-8 without BOM)

but i need it to be UTF-8 with BOM

how can i do that?

هل كانت مفيدة؟

المحلول

the answer is

printf("\xef\xbb\xbf");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top