Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

prevOpen Source→email-all-chars-within-ascii-clinext

email-all-chars-within-ascii-cli4.2.1

Command line app to scan email templates, are all their characters within ASCII range

Downloads per monthChangelogMIT Licenselibera manifesto
  • the top
  • Installation
  • QUICK TAKE
  • USE IT
  • IDEA
  • PRACTICAL USE
  • Changelog

Installation

Quick Take

Checks for unencoded or invisible characters, checks each line’s length.

use
use

Use it

Once installed, call it on a file:

ascii YOURFILE.html

or omit the file name and CLI will let you pick a file.

Idea

This CLI app will check, does your HTML file (or some other extension) contains non-ASCII characters.

Specifically, it will check, are your file contents suitable for 7bit encoding, in other words, are all characters within the basic ASCII rangeopens in a new tab, the first 126 (not 127 because of DEL) characters.

Plus, we don’t want any invisible control characters (anything below decimal point 32), EXCEPT:

  • HTopens in a new tab, horizontal tab, decimal number 9
  • LFopens in a new tab, new line, decimal number 10
  • CRopens in a new tab, carriage return, decimal number 13

Also, we don’t want character at a decimal point 127, DELopens in a new tab, which technically falls within basic ASCII range but might appear broken in email-consumption software.

Practical use

We’re going to use this library to validate our email templates, as a part of final QA. In theory, all email templates should be HTML encoded and have no characters outside the basic ASCII range (or invisible control characters like ETX). In practice, all depends on the server, because your ESP back-end might encode the rogue characters for you. But it might not, and you’d be in trouble.

We’re going to prepare for the worst and deliver all our templates ready for ANY encoding, conforming to 7bit spec: no characters beyond first 126 decimal point.

Check out the API of this CLI which works well in Gulp environment.

Changelog

Open Changelog
↑ back to top
prev next

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab