0

As I almost only get results about fonts when I am searching and those don't really help, I was hoping someone could clarify some about unicode/codepages/character(sets)

What is the logical thing to do if I want to see the actual characters in my Ubuntu(20.04) console instead of the rectangle replacements for most of them using this simple Python code.

for i in range(0,1114112):
    try:
        print(chr(i), end=' ')
    except UnicodeEncodeError:
        pass

This prints all the known (Western) characters like:

! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Ā ā Ă ă Ą

but also Chinese/Japanese characters, emoticons and I don't know what but also a lot (mostly) of these empty rectangles:

                                         

If somebody knows I would also like to know how this could be done on Windows(10) as over there even a lot less characters show up (in cmd/git bash/wsl).

Niels
  • 537
  • 5
  • 22
  • maybe you have to install font which has these characters. – furas Nov 21 '21 at 01:31
  • as I know in older Windows console was using encoding `CP1250` or `60001` and it needed some changes in registers to use `UTF-8` – furas Nov 21 '21 at 01:33
  • 2
    [Why isn't there a font that contains all Unicode glyphs? - Stack Overflow](https://stackoverflow.com/questions/34732718/why-isnt-there-a-font-that-contains-all-unicode-glyphs/34734338) – furas Nov 21 '21 at 01:37

0 Answers0