@bobfrankston/rmfmail 1.1.115 → 1.1.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,6 @@ import { MailxDB, parseSerial } from "@bobfrankston/mailx-store";
12
12
  const __dirname = import.meta.dirname;
13
13
  import { ImapManager } from "@bobfrankston/mailx-imap";
14
14
  import * as gsync from "./google-sync.js";
15
- import { sniffAndFixCharset } from "./charset.js";
16
15
  import { Store } from "@bobfrankston/mailx-store";
17
16
  import { SyncQueue } from "./sync-queue.js";
18
17
  import { Reconciler } from "./reconciler.js";
@@ -20,18 +19,10 @@ import { loadSettings, saveSettings, loadAccounts, loadAccountsAsync, saveAccoun
20
19
  import type { AccountConfig, Folder, AutocompleteRequest, AutocompleteResponse, AutocompleteSettings, AiTransformRequest, AiTransformResponse, ExtractedEvent, MailxApi } from "@bobfrankston/mailx-types";
21
20
  import { sanitizeHtml, encodeQuotedPrintable, htmlToPlainText } from "@bobfrankston/mailx-types";
22
21
 
23
- /** Detect mis-labeled charset and rewrite the part header to `utf-8` when
24
- * the body bytes are actually valid UTF-8. PHPMailer-driven senders are
25
- * the chronic offender they declare `charset=iso-8859-1` (the PHP
26
- * default) and then encode "", "'", "…" etc. as UTF-8, which simpleParser
27
- * faithfully decodes as Latin-1 and produces "â??" garbage. We only
28
- * override the obviously-wrong declarations (`iso-8859-1`, `us-ascii`,
29
- * `windows-1252`, `latin1`); anything else passes through unchanged.
30
- * Operates byte-wise so MIME boundaries / base64 / etc. are preserved.
31
- * The `utf-8` validity test rejects 0xC0–0xC1 / 0xF5–0xFF and continuation
32
- * bytes out of place, which would be common in genuine Latin-1 text. */
33
- // sniffAndFixCharset moved to ./charset.ts so LocalStore can use it
34
- // without creating a circular dep with index.ts.
22
+ // Charset normalization (sniffAndFixCharset) is owned solely by
23
+ // mailx-store/charset.ts — the single live parse path (LocalStore.getMessage)
24
+ // calls it there. mailx-service used to keep a duplicate copy that nothing
25
+ // invoked; removed 2026-05-21 (economy of mechanism one charset fixer).
35
26
 
36
27
  // parseListUnsubscribe moved to ./local-store.ts (only consumer is the
37
28
  // body-read path, which is now part of LocalStore).