Uppercase U with circumflexFull block
ASCII 219 is Û on Windows and █ in old DOS.
Û (Capital U with Circumflex) is byte 219 in Windows-1252, Unicode U+00DB. French only needs it in capitals, as in SÛR or AOÛT. It also shows up as a sign of DOS output read the wrong way. Old console programs draw bars and blocks with byte 219, the full block █ in code page 437, so when their output lands in a file that opens as Windows-1252, a progress bar like ███ turns into ÛÛÛ. Reading the file as code page 437 brings the blocks back. In UTF-8, Û is C3 9B, which misreads as Û. The HTML entity is Û.
█ (Full Block) is byte 219 in code page 437, the original IBM PC character set, and maps to Unicode U+2588. It fills the whole character cell, which makes it the solid end of the ░ ▒ ▓ █ series and the brick for progress bars, pixel art and text-mode logos. The classic C++ question is why cout << char(219) prints garbage. The program sends the single byte DB, and whatever reads it decides what it means: █ in a code page 437 console, � in a UTF-8 terminal because DB alone isn't valid UTF-8, and Û in a file opened as Windows-1252. On Windows you can sidestep code pages by switching stdout to UTF-16 with _setmode(_fileno(stdout), _O_U16TEXT) and writing std::wcout << L'\u2588', but after that switch use only wcout, since narrow cout output on that stream fails. Don't swap it for ■ (U+25A0, black square), which is smaller and leaves gaps between cells. In UTF-8, █ is E2 96 88. The HTML entity is █.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 219 is Û.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00DB\n"); /* UTF-8: C3 9B */unsigned char b = 219; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 219 0xDB */return 0;}
#include <stdio.h>int main(void) {/* Byte 219 is █ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xDB is invalid and prints as garbage, often �. */putchar(219);/* char is signed on x86, so a plain char holding 0xDB is -37.Use unsigned char when you compare or index by byte value. */char c = (char)219;unsigned char u = 219;printf("\n%d %d\n", c, u); /* -37 219 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u2588\n"); /* E2 96 88 */return 0;}
Add the leading zero: Alt+0219 gives Û. Without it, Windows looks the number up in the DOS table, where 219 is the full block used for bars and boxes, and that's the character you got. The lowercase works the same way, with Alt+0251 for û.
Your output is going to a file or a pipe on Windows (CI logs count), so Python encodes it with the system code page, usually cp1252, which has no █. Call `sys.stdout.reconfigure(encoding='utf-8')` at startup, or set PYTHONIOENCODING=utf-8 in the environment that runs the script. Printing straight to a console window usually works, which is why the error seems to show up only in some places.
Repeat it with REPT: `=REPT("█", B2/10)` draws one block per 10 units, and REPT drops the fraction on its own. If pasting █ into a formula is awkward, UNICHAR(9608) produces the same character, in Excel and Google Sheets alike. When values vary a lot, scale by the column's maximum, as in B2/MAX(B:B)*20, so the longest bar is 20 blocks.
Fill the last cell with a partial block. Unicode has left-aligned eighths from ▏ up to ▉, so print the full █ blocks first, then the eighth that matches the remainder, and each cell gets eight steps instead of just empty or full. Code page 437 only goes down to halves like ▌ (221), so the eighths need a UTF-8 terminal.
A terminal cell is roughly twice as tall as it is wide, so a single █ is a tall rectangle. Use two per pixel, ██, to get close to square. For finer detail, draw with the half block ▀ (223): color its top half with the foreground and its bottom half with the background, and each cell holds two square pixels stacked.
Only if the original characters are really gone and the blocks don't give away length. One █ per letter keeps word lengths, which can be enough to guess a short name, so use the same fixed run, like ████, for every redaction. In a PDF, a drawn black box is a different thing: the text underneath can stay selectable unless the tool actually removes it.
Add the leading zero: Alt+0219 gives Û. Without it, Windows looks the number up in the DOS table, where 219 is the full block used for bars and boxes, and that's the character you got. The lowercase works the same way, with Alt+0251 for û.