Writing Unicode Strings using wxFile

Nusret Taşçı nusi at sofha.de
Wed Nov 29 04:18:03 PST 2006


I'm sorry, I meant to use 'magic', not the pointer to it:

wxString strSearchResults;
wxFile tempFile;
if(tempFile.Open(wxT("SearchResults.txt"), wxFile::write))
{
	unsigned char magic[2] = {0xFF, 0xFE};
	tempFile.Write(magic, 2); // <-- was wrong in my previous post
	tempFile.Write(strSearchResults);
	tempFile.Close();
}




More information about the wx-users mailing list