Outlook is not Unicode compliant, is it?

J

Jenny Tam

I have heard that Outlook (meaning Outlook 2000 and Outlook XP) is not
really Unicode compliant until Outlook 2003. Is this true?

I need to know whether Outlook 2000 and Outlook XP (using Personal
Folders and/or Exchange) can read / write Unicode characters.

Any comments or pointers are appreciated.

Thanks,
Jenny
 
M

Milly Staples [MVP - Outlook]

Unicode characters and unicode file formats are apples and oranges.

--
Milly Staples [MVP - Outlook]

Post all replies to the group to keep the discussion intact. Due to
the (insert latest virus name here) virus, all mail sent to my personal
account will be deleted without reading.

After searching google.groups.com and finding no answer, Jenny Tam asked:

| I have heard that Outlook (meaning Outlook 2000 and Outlook XP) is not
| really Unicode compliant until Outlook 2003. Is this true?
|
| I need to know whether Outlook 2000 and Outlook XP (using Personal
| Folders and/or Exchange) can read / write Unicode characters.
|
| Any comments or pointers are appreciated.
|
| Thanks,
| Jenny
 
J

Jenny Tam

Please bear with me. I guess I should let you know what I want to
achieve. Let's say I have a database in Unicode format. If I write a
program to retrieve data (say email addresses) from the database, and
to create a new MailItem in Outlook 2000, Outlook XP or Outlook 2003,
preaddressed with these email addresses and possibly with a subject
and a message body as well. All these could be in Unicode format (say
Japanese, Chinese, etc.)

Similarly, when the user selects a MailItem in Outlook, I would like
to allow the user to export this particular MailItem back to the
database (in Unicode format). However, I believe this direction
should be ok.

Thanks in advance,
Jenny
 
M

Milly Staples [MVP - Outlook]

Sorry - I don't do programming - perhaps someone else can assist on this
one.

--
Milly Staples [MVP - Outlook]

Post all replies to the group to keep the discussion intact. Due to
the (insert latest virus name here) virus, all mail sent to my personal
account will be deleted without reading.

After searching google.groups.com and finding no answer, Jenny Tam asked:

| Please bear with me. I guess I should let you know what I want to
| achieve. Let's say I have a database in Unicode format. If I write a
| program to retrieve data (say email addresses) from the database, and
| to create a new MailItem in Outlook 2000, Outlook XP or Outlook 2003,
| preaddressed with these email addresses and possibly with a subject
| and a message body as well. All these could be in Unicode format (say
| Japanese, Chinese, etc.)
|
| Similarly, when the user selects a MailItem in Outlook, I would like
| to allow the user to export this particular MailItem back to the
| database (in Unicode format). However, I believe this direction
| should be ok.
|
| Thanks in advance,
| Jenny
|
|
|
|
| "Milly Staples [MVP - Outlook]"
| || Unicode characters and unicode file formats are apples and oranges.
||
|| --
|| Milly Staples [MVP - Outlook]
||
|| Post all replies to the group to keep the discussion intact. Due to
|| the (insert latest virus name here) virus, all mail sent to my
|| personal
|| account will be deleted without reading.
||
|| After searching google.groups.com and finding no answer, Jenny Tam
|| asked:
||
||| I have heard that Outlook (meaning Outlook 2000 and Outlook XP) is
||| not
||| really Unicode compliant until Outlook 2003. Is this true?
|||
||| I need to know whether Outlook 2000 and Outlook XP (using Personal
||| Folders and/or Exchange) can read / write Unicode characters.
|||
||| Any comments or pointers are appreciated.
|||
||| Thanks,
||| Jenny
 
K

Ken Slovak - [MVP - Outlook]

A lot of it depends on how you access the Outlook data store.

There are and have been for a long time MAPI properties that are Unicode.
There are always _W properties such as CdoPR_DISPLAY_NAME_W (0x805371935 )
for 8-bit strings that you can access using Extended MAPI, CDO 1.21 or
Redemption. Retrieving the values using the Outlook object model returns
8-bit strings mapped according to the current code page.

You can look at the standard, _A and _W MAPI properties by using the Object
Browser on the CDO 1.21 library (cdo.dll) if you have CDO 1.21 installed.

Of course, depending on the language you are using for your code you might
have to deal with Unicode strings as arrays of byte.

If necessary you can always call the Win32 API character conversion
functions.

Outlook 2003 is the first version of Outlook to support a Unicode data store
for PST files and when using versions of Exchange that support Unicode
mailboxes. However, what you get and how it's encoded depends not only on
the data store but also on the code page you're using.
 
J

Jenny Tam

Thank you for your detailed post. What I am worried is that if I want
to paste some text (say Japanese or Chinese) retrieved from a Unicode
database (SQL Server or Oracle) as the subject or body to create a new
MailItem in Outlook, the subject or body will show some garbage ... In
that case, would WideCharToMultiByte() or any API work?

On the other hand, I am not as worried about getting MAPI properties
from Outlook (using _W properties as suggested). However, I don't
think it works at all if I get the MAPI properties in Unicode, but
store them in a non-unicode database, does it?

Thanks in advance,
Jenny
 
K

Ken Slovak - [MVP - Outlook]

You'll have to do some experimenting of course. Depending on the code page,
and you can change that using code, you can work with different character
sets and language encodings by converting Unicode to an 8-bit string encoded
for that code page. That can be done using something like the VB/VBA StrConv
function or by using those Win32 API calls.

When you read in Unicode and need to store it in a non-Unicode database
you're going to have to convert the text into non-Unicode or store it as a
binary blob. That's sort of what you do in VB/VBA when you convert a
non-Unicode string into a Unicode string using StrConv, you get the result
as an array of Bytes.

Are there still any databases around that don't support Unicode? SQL Server
and the other major ones certainly do and any database compliant with SQL
specs of any recent vintage would support something like an nvchar data type
for Unicode strings.
 
J

Jenny Tam

Thanks again! My question is then whether Outlook 2003 saves me from
doing the string conversion since it supports Unicode. I believe I
can not avoid converting strings for Outlook 2000 or Outlook 2002
however. :(

Thanks in advance,
Jenny
 
Top