Skip to main content

Latin1 vs UTF8

Latin1 was the early default character set for encoding documents delivered via HTTP for MIME types beginning with /text . Today, only around only 1.1% of websites on the internet use the encoding, along with some older appplications. However, it is still the most popular single-byte character encoding scheme in use today. A funny thing about Latin1 encoding is that it maps every byte from 0 to 255 to a valid character. This means that literally any sequence of bytes can be interpreted as a valid string. The main drawback is that it only supports characters from Western European languages. The same is not true for UTF8. Unlike Latin1, UTF8 supports a vastly broader range of characters from different languages and scripts. But as a consequence, not every byte sequence is valid. This fact is due to UTF8's added complexity, using multi-byte sequences for characters beyond the general ASCII range. This is also why you can't just throw any sequence of bytes at it and e...

Savagery vs Science

Savagery is sort of the opposite of science, in that it's a kind of impulsive readiness to believe or disbelieve with absolute certainty, often followed by false religious zeal or dogma. But on the contrary, science is inductive, and often accompanied by what I think of as idiosyncratic nuance—sort of believing things all the time, but never completely—everyone having guesses about how things work, or how things really are, but some guesses being more accurate and respectable than others.

There was once a janitor who worked at a royal academic institution. One of the professors, running late for a meeting, entered the building in a hurry, so he helped the professor check his hat and personal belongings into the front office. The professor, running behind schedule, didn't have time to forge a note declaring ownership of his items. But the janitor gestured to him to go ahead, assuring him his items would be safe. Later, when the professor returned to collect his belongings, he asked "Do you have my hat?" and the janitor assured him he did. But the professor was skeptical. After all, the royal academy was a very busy place. "But how do you know it is my hat?" he asked, to which the janitor replied sharply, "Sir, I do not know if it is your hat. But it is the hat you gave me."

Comments

Popular posts from this blog

yt-dlp Archiving, Improved

One annoying thing about YouTube is that, by default, some videos are now served in .webm format or use VP9 encoding. However, I prefer storing media in more widely supported codecs and formats, like .mp4, which has broader support and runs on more devices than .webm files. And sometimes I prefer AVC1 MP4 encoding because it just works out of the box on OSX with QuickTime, as QuickTime doesn't natively support VP9/VPO9. AVC1-encoded MP4s are still the most portable video format. AVC1 ... is by far the most commonly used format for the recording, compression, and distribution of video content, used by 91% of video industry developers as of September 2019. [ 1 ] yt-dlp , the command-line audio/video downloader for YouTube videos, is a great project. But between YouTube supporting various codecs and compatibility issues with various video players, this can make getting what you want out of yt-dlp a bit more challenging: $ yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best...