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...

Horizontal vs Vertical Distinction

The definition of metaphor is: “a figure of speech in which a word or phrase is applied to an object or action to which it is not literally applicable.”

On my other blog, I shared a thought about metaphors:

Metaphors are cool because they let you reason about a domain of knowledge by using tools that were originally intended for a different domain.

Metaphors are useful! A related but distinctly different concept from a metaphor is the concept of metonymy.

The primary difference is that a metaphor draws a similarity between objects—that is, the relation is vertical.

On the other hand, a metonym draws a link between objects that are contiguous but not similar—that is, the relation is horizontal.

The sentence “When I eat raw habanero peppers, they set my mouth on fire” is a metaphor, while the sentence "A new Oval Office has been elected" is a metonym.

In the first sentence, "peppers" and "fire" draw a similarity to one another, e.g., they are different things that can both be described as “hot.”

In the second sentence, "Oval Office" is used as a substitution for "president." The Oval Office and the president are two different things, but they are contiguous; e.g., the Oval Office is the working space of the president.

Variations of horizontal-vertical distinctions are also useful in other domains. In biology, it is frequently used to describe the transmission of genes or disease. For example, if a mother transmits a disease to her offspring during pregnancy, at birth, or through breastfeeding, she has vertically transmitted it. Conversely, if you were to catch a cold, see a friend, and transmit the cold to them, you would have horizontally transmitted it.

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...