6 Matching Annotations
  1. Nov 2022
    1. The btoa() function takes a JavaScript string as a parameter. In JavaScript strings are represented using the UTF-16 character encoding: in this encoding, strings are represented as a sequence of 16-bit (2 byte) units. Every ASCII character fits into the first byte of one of these units, but many other characters don't. Base64, by design, expects binary data as its input. In terms of JavaScript strings, this means strings in which each character occupies only one byte. So if you pass a string into btoa() containing characters that occupy more than one byte, you will get an error, because this is not considered binary data:
    2. If you need to encode Unicode text as ASCII using btoa(), one option is to convert the string such that each 16-bit unit occupies only one byte.
  2. Aug 2021
    1. �Yes, but how will we ever keep track of such a large project?�

      Unsure of the text encoding here. I'm forcing them to be interpreted as Unicode here, hence the appearance of the replacement character. My browser's default is to treat this document as "Central European (Windows)", but in that case, they appear as majuscule and miniscule S-cedilla characters (e.g. Şhypertextş).

      By a reasonable guess, these are supposed to be open and close quotes. I've seen these appear in other TBL-authored documents from the same era.

  3. Apr 2021