Sunday, May 22nd, 2022

Unicode / UTF-8

Sunday, May 22nd, 2022 06:27 pm
darkoshi: (Default)
From what I have determined, the Wordle "Share" function saves these Unicode characters:

Black Square: (U+2B1B)
White Square: (U+2B1C)
Yellow Square: (U+1F7E8)
Green Square: (U+1F7E9)

But when I look at the saved text in a Hex Editor, why does it instead show these values?

Black Square: e2 ac 9b
White Square: e2 ac 9c
Yellow Square: f0 9f 9f a8
Green Square: f0 9f 9f a9

The Hex Editor does indeed recognize those values as the above Unicode equivalents as it shows them in the side panel.

So how does e2 ac 9c get converted to 2b 1b, etc?

Never mind, I figured it out. It uses UTF-8 encoding.

e2 ac 9b
-> (in binary) 1110 0010 . 1010 1100 . 1001 1011
-> (bracketing the parts that are constant) [1110] 0010 . [10]10 1100 . [10]01 1011
-> (stripping out the parts in brackets) 0010 1011 . 0001 1011
-> 2b 1b

f0 9f 9f a8
-> 1111 0000 . 1001 1111 . 1001 1111 . 1010 1000
-> [1111 0]000 . [10]01 1111 . [10]01 1111 . [10]10 1000
-> (go right to left and add zeros as necessary on the left end to make it a full byte) 0000 0001 . 1111 0111 . 1110 1000
-> 01 f7 e8

Nandina

Sunday, May 22nd, 2022 11:08 pm
darkoshi: (Default)
Both my yard and Qiao's has clumps of this bush: Nandina, also known as "Heavenly Bamboo".

Individual stalks of it aren't too hard to pull out when they are young. But when they get taller and start growing a bunch of stalks in a small area which is what they do, they are very hard to get rid of. I can cut them down, but they grow back (like everything else in the yard, so frustrating!). It has a curiously yellow wood. It gets small white flowers, and clusters of red berries, which I thought must at least be good for birds. But per the Wikipedia page, Nandina, the berries are toxic to birds and animals!

I haven't seen dead birds in our yards, so hopefully the birds know to avoid them.

Now that I know it's not even a good food source for birds, I'll be even more ruthless in cutting it down.

May 2025

S M T W T F S
    123
45678910
11121314151617
1819 2021222324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, May 22nd, 2025 03:54 pm
Powered by Dreamwidth Studios