I have a message that has both english and japanese characters in it's
PR_BODY property. I am trying to make a copy of this message by
calling the CopyTo function. But when i open the newly created
message, it shows some invalid characters in place of the Japanese
characters in the body text, although it shows the english characters
properly.
From the new inspector menu bar --> Other Actions --> Encoding, when i
set the encoding to Japanese (Auto-Select), i can see the Japanese
characters.
So, i want to know if i can do the same thing, i.e. setting the
encoding, from my code. I am using a stream to write the body text
into the new message. I tried by calling WideCharToMultiByte, but then
the whole text string became something like "...????5?????4???..."
I have searched groups and have come to know that i can use
IMultiLanguage::ConvertStringToUnicode to achive this. Can someone
please tell me how to use it? Or is there a better way around?
Any sample code will be very much appreciated.
Thanks in advance
~Surjya.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Surjya" <surjy...@gmail.com> wrote in message
news:2050ac2b-695e-4f73...@k36g2000pri.googlegroups.com...
I am not sure if the message comes from a unicode enabled message
store, but for now i am assuming it does.
A few more things i did with my code: Used CP_UTF8 while calling
WideCharToMultiByte. Now i am able to see the english chracters but
not the japanese characters. But when i open the message and set the
encoding (Actions->Encoding) to Japanese Autoselect i get to see the
japanese characters as well.
Thanks
~Surjya.