HBufC8* to CEikGlobalTextEditor
| Wed, 2008-01-30 02:59 | |
|
I have a HBufC8* pData and a TPtr8 ptr8Data(pData->Des()) pointing to some data that I need to display. I am trying to display these characters correctly in my CEikGlobalTextEditor but have encountered several problems. I know it has something to do with 16bit/8bit conversions but trial and error is getting me nowhere. Paris ~~~~ |
|






Forum posts: 672
Have you tried copying the HBufC8 data to HBufC using HBufC::Copy(const TDesC8 & aData)? Then put this HBufC to the editor.
Forum posts: 175
Hi Andreas,
yes I tried that, but unicode characters are always lost. I only get ASCII
If I SetTextL() : Euro=€ Copyright=©
The editor only shows Euro= Copyright=
~~~~
Forum posts: 1241
If you really have Unicode in your *8 bit* descriptor (not really sure, if you ask me), it must be in UTF-8 encoding. SetTextL uses UTF-16. So you must convert first with the help of CnvUtfConverter::ConvertToUnicodeFromUtf8.
René Brunner
Forum posts: 175
I can't thank you enough rbrunner!
Your 3 line suggestion completely fixed my problem.
many many thanks!!!!!!!!!
~~~~