Every country's flag can be produced with colon code.
All (?) Puppies contain the text file /usr/share/zoneinfo/iso3166.tab, listing all official 2-letter ISO 3166 country codes and country names.
We have seen that sometimes the 2-letter code works in "colon code", very often the country name , but sometimes none of these methods do. E.g. how to generate the flag of CD Congo (Dem. Rep.) ?
There is a third method that always work. As demonstrated with the last emoticon of my last post it is possible to generate any smily/emoticon/symbol of the Twemoji font by enclosing its codepoint with colons: :1f383:
To generate flags, we need 2 codepoints. "Regional indicator symbol" characters is a group of 26 4-byte Unicode characters depicting uppercaee characters A-Z. Each character is defined by a hexadecimal 5-digit codepoint:
Code: Select all
A = 1f1e6
B = 1f1e7
C = 1f1e8
D = 1f1e9
E = 1f1ea
F = 1f1eb
G = 1f1ec
H = 1f1ed
I = 1f1ee
J = 1f1ef
K = 1f1f0
L = 1f1f1
M = 1f1f2
N = 1f1f3
O = 1f1f4
P = 1f1f5
Q = 1f1f6
R = 1f1f7
S = 1f1f8
T = 1f1f9
U = 1f1fa
V = 1f1fb
W = 1f1fc
X = 1f1fd
Y = 1f1fe
Z = 1f1ff
To produce the CD flag we can now pick the codepoints tor C and for D from above list. Using them by their own they will produce "square" letters, maybe useful for buttons: :1f1e8:
:1f1e9:
, but combining them , in "colon code" done a with a hyphen, conveniently produces the flag associated with this country code:
:1f1e8-1f1e9:
Apart from the ISO 3166 codes listed in the mentioned text files, there are a couple of ISO codes with a special status, e.g. "extended", and they also work:
AC Ascension Island
CP Clipperton Island
DG Diego Garcia
EA Ceuta, Melilla
EU European Union
IC Canary Islands
TA Tristan da Cunha
UN United Nations
XK Kosovo
I learned something. I always thought that the Canary Islands would use the Spanish flag (like Ceuta, Melilla), but they have their own: :canary_islands:
. I'm also surprised that :kosovo:
is included although almost half of the UN member states don't recognize this country.
And then there is Great Britain and its subdivisions:
GB-ENG England
GB-NIR Northern Ireland
GB-SCT Scotland
GB-WLS Wales
These entities are constructed completely different and require not 2 but 7 codepoints, and not the ones in above list:
:1f3f4-e0067-e0062-e0073-e0063-e0074-e007f:
Fortunately names work too:
:england:
:scotland:
:wales:
And where is Northern Ireland? Doesn't exist The Twemoji font used by BB simply doesn't contain this flag.
The flag is present in the NotoColorEmoji font, installed in BW64 and probably other Puppies. If installed the flag can be displayed with a script like this:
Code: Select all
#! /bin/bash
echo -n $'\U1F3F4\UE0067\UE0062\UE006E\UE0069\UE0072\UE007F' | gxmessage -fn 124 -file -