trichview.com

trichview.support




Unicode and SaveRVFToStream.


Return to index


Author

Message

[email protected]

Posted: 05/16/2004 11:11:13


Hi


I want to support Unicode in my application.


I would like to know how to save the content to a Stream then covert

that to string variable.


All text styles' Unicode properties are set to true.


Below is my code. I get scrambled characters with that.


Please help me out.



//-------------------------------------------------


TMemoryStream *l_Stream = new TMemoryStream();

RichViewEdit1->SaveRVFToStream(l_Stream, false);


WideString l_Buffer;

l_Buffer.SetLength(l_Stream->Size);

l_Stream->Position = 0;

l_Stream->Read(l_Buffer.c_bstr(), l_Buffer.Length()*sizeof(wchar_t));

delete l_Stream;


ShowMessage(l_Buffer);


//-------------------------------------------------





Powered by ABC Amber Outlook Express Converter