Pᴇʜ
Pᴇʜ

Reputation: 57743

Which unicode character can be used as a pictogram for a QR code?

I wonder if there is a Unicode character symbolizing a QR code?

I think I have seen that some time ago as an character but I can't remember if it was a custom font or an official Unicode character.

Upvotes: 1

Views: 2575

Answers (4)

JJoao
JJoao

Reputation: 5357

Yes. Try install qrencode (https://fukuchi.org/works/qrencode/index.html.en)

qrencode -t UTF8 -o file "José João Dias de Almeida"

makes a textual file "file" (17 lines):

█████████████████████████████████
█████████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄█▀▀▄█ ▄▄▄▄▄ ████
████ █   █ █▀▀▀█ ▀▀ ██ █   █ ████
████ █▄▄▄█ █▀ █▀▀█▀▀▀█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█ █▄█▄▄▄▄▄▄▄████
████ ▄ ▄ █▄▄ ▄▀▄ ▄█▄ ▄█▄▀ █ █████
████   ▀▄▀▄█▀█▄█▀██ ▄▀▄▄▄█  ▄████
████ ▄█▄▄ ▄▀█▄▄▀▄█▄▄▀▄▄▀▀ █▄█████
████ █ █ ▄▄▄██ █▄█▀ ▄ █  ▀ ▄▄████
████▄███▄▄▄█▀▀▄▀▄ ▄▀ ▄▄▄   █▀████
████ ▄▄▄▄▄ █▄███▀█▄█ █▄█ ▀█ ▄████
████ █   █ █ ▀  ▄ ▄ ▄▄ ▄  ▄▀▀████
████ █▄▄▄█ █ ▄ ███ ▀██▀▄▀▄██ ████
████▄▄▄▄▄▄▄█▄███▄▄▄███▄█▄▄█▄▄████
█████████████████████████████████
█████████████████████████████████



$ wc -l file
17 

This is using just the following chars (unicode block elements):

' '    (the space)
'▀'    2580  ▀  Upper Half Block
'▄'    2584  ▄  Lower Half Block
'█'    2588  █  Full Block                    

If you want to show this on a website without the white stripes, use the following CSS and HTML:

pre {
  line-height: 1;
}
<pre>
█████████████████████████████████
█████████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄█▀▀▄█ ▄▄▄▄▄ ████
████ █   █ █▀▀▀█ ▀▀ ██ █   █ ████
████ █▄▄▄█ █▀ █▀▀█▀▀▀█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█ █▄█▄▄▄▄▄▄▄████
████ ▄ ▄ █▄▄ ▄▀▄ ▄█▄ ▄█▄▀ █ █████
████   ▀▄▀▄█▀█▄█▀██ ▄▀▄▄▄█  ▄████
████ ▄█▄▄ ▄▀█▄▄▀▄█▄▄▀▄▄▀▀ █▄█████
████ █ █ ▄▄▄██ █▄█▀ ▄ █  ▀ ▄▄████
████▄███▄▄▄█▀▀▄▀▄ ▄▀ ▄▄▄   █▀████
████ ▄▄▄▄▄ █▄███▀█▄█ █▄█ ▀█ ▄████
████ █   █ █ ▀  ▄ ▄ ▄▄ ▄  ▄▀▀████
████ █▄▄▄█ █ ▄ ███ ▀██▀▄▀▄██ ████
████▄▄▄▄▄▄▄█▄███▄▄▄███▄█▄▄█▄▄████
█████████████████████████████████
█████████████████████████████████
</pre>

Upvotes: 5

Darkyen
Darkyen

Reputation: 155

There is nothing official, but U+25A3 WHITE SQUARE CONTAINING BLACK SMALL SQUARE ▣ might be good enough for some use cases.

Upvotes: 4

Thomas H. Schmidt
Thomas H. Schmidt

Reputation: 458

I would propose the Tetragram for stoppage, 𝍌, Unicode U+1D34C, hexadecimal: 0x1d34c in block Tai Xuan Jing Symbols. Maybe you prefer another Tai Xuan Jing symbol, there are several to choose from.

Upvotes: 3

brighty
brighty

Reputation: 402

I bet you mean a unicode character. There is no such thing like a utf-8 character. You can encode a character in utf-8. I never heard about that unicode codepoints cover qr codes. With private codepoints as well as the appropriate font it's of course possible.

Upvotes: 1

Related Questions