quoted-printable-lite
- Ever needed to send utf-8 data through communication standards established in the 90s and earlier?
- Want a simple, zero-dependency library you can shove a buffer containing utf8 text into and get 7-bit safe data in return?
- Are you that afraid of using base64 to bloat the size of your auto-generated e-mails?
- Are you parsing .eml files for some strange-ass reason?
Well, then quoted-printable-lite
is the package for you
This package implements the Quoted-Printable
content transfer encoding as defined by RFC 2045
What is a "Quoted-Printable"?
It's a binary-to-text encoding scheme that only uses 7-bit ascii. Think URI-Encoding except with "=" instead of "%" with a 76 character wide limit (I know right)
Where can I use it?
Browser and node. This thing will use/return Buffers if it finds a global Buffer object. Otherwise, it'll use Uint8Arrays
How do I use it?
const encode decode = ;const textToEncode = "Hello, world!😄\nHow are you? This is a real nice day today, isn't it? Do you think I hit 76 characers yet for this demonstration? Probably"; const encodedBuffer = ; const encodedString = buffer; // You can use String.fromCharCode(...buffer) on the browser for this/*Will output: "Hello, world!=F0=9F=98=84\r\n" + "How are you? This is a real nice day today, isn't it? Do you think I hit 76=\r\n" + " characers yet for this demonstration? Probably"*/console; const decodedBuffer = ; /*Will output:"Hello, world!😄\r\nHow are you? This is a real nice day today, isn't it? Do you think I hit 76 characers yet for this demonstration? Probably"*/console;