Writing Unicode Strings using wxFile
Amit
amitgupta.it at gmail.com
Wed Nov 29 21:34:18 PST 2006
Nusret Tasçi wrote:
> 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();
Thanks to all for your valuable inputs.
The real problem was this that wxFile::write() function writes the
content in UTF8 format and excel is unable to render a csv file in UTF8
format.
Regards
- Amit Gupta
More information about the wx-users
mailing list