Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft documentation vs msg.cpp #8

Open
inzanez opened this issue Aug 31, 2022 · 11 comments
Open

Microsoft documentation vs msg.cpp #8

inzanez opened this issue Aug 31, 2022 · 11 comments

Comments

@inzanez
Copy link

inzanez commented Aug 31, 2022

Hi

I was wondering how the difference between the values used in "msg.cpp" for "msg" properties differ from the official Microsoft documentation found here.

For instance, PidTagBodyHtml should be 0x1013001F but in msg.cpp it is 0x1013001E. Actually pretty much all values ending on E should be ending on F according to the documentation from Microsoft.

Any idea how that happened?

@pabs3
Copy link
Member

pabs3 commented Sep 1, 2022 via email

@inzanez
Copy link
Author

inzanez commented Sep 1, 2022

@pabs3 Ok, it seems that there's two versions of msg containers:

  • one which is non-unicode, and therefore stores string information in PtypString8 which is ending on ...E
  • one which is unicode (UTF-16 in fact) that stores string information usually as PtypString which is ending on ...F

@pabs3
Copy link
Member

pabs3 commented Sep 1, 2022 via email

@inzanez
Copy link
Author

inzanez commented Sep 2, 2022

@pabs3 Well, for PST files themselves: pretty much all new PST files are Unicode and not ASCII. And I think it would be the same for all MSG files that are exported by modern software with sane defaults.

I am afraid that I currently don't have the time to build that support...maybe in the future,...:-)

@pabs3
Copy link
Member

pabs3 commented Sep 3, 2022 via email

@inzanez
Copy link
Author

inzanez commented Sep 3, 2022

@pabs3 I will do so once I find one I can post easily. Otherwise I will try to make one myself (using a Microsoft Product). Actually, all recent "pst" files created by Outlook should be UTF.

@pabs3
Copy link
Member

pabs3 commented Nov 23, 2022

@inzanez did you manage to find/create a PST file with UTF-16 PidTagBodyHtml that you can share?

@inzanez
Copy link
Author

inzanez commented Nov 23, 2022

@pabs3 Oh yes, thanks for the reminder. I will get back to you soon.

@pabs3
Copy link
Member

pabs3 commented Aug 14, 2023

@inzanez did you manage to find/create a PST file with UTF-16 PidTagBodyHtml that you can share?

pabs3 added a commit that referenced this issue Aug 15, 2023
They are separate fields rather than a single field.

See-also: #8
@pabs3
Copy link
Member

pabs3 commented Aug 15, 2023

@inzanez btw I refactored the code to split 0x1013001F up into two values, because it is clear from the docs that 0x001F is the type and 0x1013 is the id.

https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagbodyhtml-canonical-property
https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/property-types

@pabs3
Copy link
Member

pabs3 commented Aug 15, 2023

@inzanez btw did you see some issue caused by the 0x1013001F vs 0x1013001E thing, or was it just a curiosity after reading the specs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants