Skip to content

Fix XML message export and gate legacy EML option behind a setting#974

Merged
stephenegriffin merged 5 commits into
microsoft:mainfrom
bwittgen:export-cleanup-and-legacy-toggle
Jun 15, 2026
Merged

Fix XML message export and gate legacy EML option behind a setting#974
stephenegriffin merged 5 commits into
microsoft:mainfrom
bwittgen:export-cleanup-and-legacy-toggle

Conversation

@bwittgen

Copy link
Copy Markdown
Contributor
  • Save Message To File: rename "Text file" dropdown label to "XML file (saves all properties of message to an XML file)" so the option matches the format it actually produces.

  • Fix invalid XML output from every XML exporter (property pane, dumpStore, profile, contents-table dump, MrMAPI). The files are written as UTF-16 LE (MyOpenFile uses "w, ccs=UNICODE", which emits a UTF-16 LE BOM), but g_szXMLHeader declared encoding="iso-8859-1", causing every conformant XML parser to reject the file. Updated the shared header constant to declare encoding="UTF-16".

  • Remove the dead "EML file (using PR_INTERNET_CONTENT)" export option and its SaveToEML implementation. The PR_INTERNET_CONTENT path has not produced usable EML on any modern store for years.

  • Add an "Enable legacy features" registry/Options toggle (default off). When off, the remaining IConverterSession-based EML export option is hidden from the Save Message To File dropdown. The export code path is preserved so administrators can re-enable it without a rebuild.

  • Refactor the exporter dropdown -> exportType mapping from a positional static_cast to a switch on GetDropDownValue so the enum no longer has to track dropdown ordering. This is what makes the gated-row behavior above safe.

Comment thread core/res/Resource.h Outdated
@bwittgen

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@bwittgen bwittgen force-pushed the export-cleanup-and-legacy-toggle branch from db589a4 to 271ab3a Compare June 12, 2026 17:54

@stephenegriffin stephenegriffin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also - you need to fix whatever's broke in the arm build

Comment thread UI/file/exporter.cpp
@bwittgen bwittgen force-pushed the export-cleanup-and-legacy-toggle branch from 271ab3a to f134b8b Compare June 12, 2026 19:51
* Save Message To File: rename "Text file" dropdown label to
  "XML file (saves all properties of message to an XML file)" so
  the option matches the format it actually produces.

* Fix invalid XML output from every XML exporter (property pane,
  dumpStore, profile, contents-table dump, MrMAPI). The files are
  written as UTF-16 LE (MyOpenFile uses "w, ccs=UNICODE", which
  emits a UTF-16 LE BOM), but g_szXMLHeader declared
  encoding="iso-8859-1", causing every conformant XML parser to
  reject the file. Updated the shared header constant to declare
  encoding="UTF-16".

* Remove the dead "EML file (using PR_INTERNET_CONTENT)" export
  option and its SaveToEML implementation. The PR_INTERNET_CONTENT
  path has not produced usable EML on any modern store for years.

* Add an "Enable legacy features" registry/Options toggle (default
  off). When off, the remaining IConverterSession-based EML export
  option is hidden from the Save Message To File dropdown. The
  export code path is preserved so administrators can re-enable it
  without a rebuild.

* Refactor the exporter dropdown -> exportType mapping from a
  positional static_cast to a switch on GetDropDownValue so the
  enum no longer has to track dropdown ordering. This is what
  makes the gated-row behavior above safe.
@bwittgen bwittgen force-pushed the export-cleanup-and-legacy-toggle branch from f134b8b to 3652fdd Compare June 12, 2026 20:18
@stephenegriffin stephenegriffin merged commit 465be1d into microsoft:main Jun 15, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants