Quote Originally Posted by Mith View Post
I loaded a file with a BOM header FFFE using the flag RtfLoadSaveFormatUnicodeText into a RichTextBox.
The BOM header was removed and not shown up at the text window.
Everything was fine until here.

Later i saved the file with the flag RtfLoadSaveFormatUnicodeText but the BOM header FFFE not have been added to file again!
I thought using the flag RtfLoadSaveFormatUnicodeText when saving a file would always add the BOM header to the file...

Is this a bug or how can i save the file including the BOM header again?
Thanks. Fixed.

That was a "bug". Not really a bug because the rich edit control just handle streams. It does not care about BOM header.
So it was an oversight by me to not write the BOM header when saving a Unicode file.