문제

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