Skip to content

fix(rules): content/mojibake no longer flags uppercase Portuguese words ending in à (#1617) - #1619

Closed
nc9 wants to merge 2 commits into
mainfrom
fix/mojibake-uppercase-portuguese-1617
Closed

nc9 wants to merge 2 commits into
mainfrom
fix/mojibake-uppercase-portuguese-1617

Conversation

@nc9

@nc9 nc9 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

What

content/mojibake listed à plus a regular space (U+0020) as the mojibake form of à. Decoding the UTF-8 bytes C3 A0 as latin1/cp1252 gives à plus a no-break space (U+00A0), so the regular-space entry matched any word ending in a capital à before a space (MANHÃ, IRMÃ, MAÇÃ). The sequences for à and for the no-break space (Â) now use U+00A0.

Why

Valid UTF-8 Portuguese headings and buttons were reported as utf8-as-latin1 corruption.

Tests

  • packages/rules/tests/mojibake.test.ts: uppercase false positives (words and the rule on a page), genuine à + U+00A0 and  + U+00A0 still reported, regular space after  clean. Fixtures use invented text.
  • Also run: docs-rule-pages.test.ts, make validate in docs/, oxlint, tsgo on packages/rules.
  • CHANGELOG bullet under Unreleased; rule docs page updated.

The squirrelscan agent skill does not need a change (false-positive fix).

Closes #1617

@nc9

nc9 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Landed via #1624 (rebase-merged, commits on main from f6787b4 to f2775ee: 902f93a and f6787b4 for #1617, 2361aa4 and ce40f50 for #1616, 383183e, 04e984e, 0f79f70 for #1615). Closing this draft as superseded.

nik

@nc9 nc9 closed this Nov 7, 2026
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.

content/mojibake: false positive on valid uppercase Portuguese words ending in "Ã"

1 participant