# Source text and encoding

Preserve UTF-8 without a byte-order mark for all source, templates, scripts, translations and documentation. Use LF line endings, following `.editorconfig` and `.gitattributes`.

When reading or writing files programmatically, specify UTF-8 explicitly. For Python use `read_text(encoding="utf-8")` and `write_text(..., encoding="utf-8", newline="\n")`. Avoid default Windows/PowerShell encodings, lossy conversions, and treating a UTF-8 file as a legacy code page. Do not remove valid accents, Arabic or other Unicode to mask a problem. Repair affected sequences only when their intended text is known.

Before finishing text or UI changes, run `php scripts/check-text-encoding.php`, rebuild frontend assets when needed, and inspect the rendered labels. The check also runs in the test suite, `composer test` and GitHub Foundation checks. Do not suppress its failures or add broad exclusions for application source. Keep private runtime files and third-party dependencies out of source scans. Never rewrite customer records or encrypted data to repair a source-label problem.

# Compiled frontend deployment

Track the production `public/build/manifest.json` and its compiled assets in Git. After changing frontend source, run `npm run build` and commit the resulting additions, modifications and removed old asset files with the source change. The cPanel host has no npm; `git pull` must deploy matching frontend assets without a separate ZIP upload. Keep `public/hot`, `node_modules`, `.env` and private runtime data ignored. Never embed secrets in frontend build variables.
