You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1114 lines
53 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Encoding systems: *ASCII*, *PETSCII*, *Unicode*"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Encoding systems\n",
"\n",
"The process of converting from one type of information to another is called encoding. You can think of it as a similar process to [Morse Code](https://en.wikipedia.org/wiki/Morse_code) where longer and shorter beeps represent letters. \n",
"\n",
"![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/International_Morse_Code.svg/450px-International_Morse_Code.svg.png)\n",
"\n",
"`(Exercise: try to use the encoding system above to decode this: .... . .-.. .-.. ---- .-- ---- .-. -..)`\n",
"\n",
"Or the process of dialing a phone number, where pressing the keys generate [a specific sound](https://www.youtube.com/watch?v=dIHqT0IhZwI) which tells the computers at the phone central who to connect you to. \n",
"\n",
"Using the technique of encoding and decoding binary numbers can be made to represent everthing you see on the computer. There are standards, conventions which describe how something should be encoded and decoded so that one type of information can be translated in multiple places.\n",
"\n",
"**n.b.** That encoding is not the same as encrypting! In the process of encoding the mapping between the code and the desired result are known and communicated. In encryption that mapping is purposely kept a secret. \n",
"\n",
"## Text encodings\n",
"\n",
"As a computer can only work with numbers, it cannot process of letters text directly. In order to work with text, textual characters need to be translated into numbers and vice versa. This is done via the process of text encodings.\n",
"\n",
"It might be your first reaction to think that this shouldn't be so difficult. We could represent the letter in binary code. An `a` encoded as a `0`, `b` as a `1` and `c` as a `01` etc. And in fact this is more or less how text encodings work. However, at the time when computing was being developed different encodings emerged.\n",
"\n",
"![](https://upload.wikimedia.org/wikipedia/commons/7/77/Wikipedia_in_binary.gif)\n",
"\n",
"### ASCII encoding \n",
"\n",
"![ASCII table](https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/USASCII_code_chart.png/640px-USASCII_code_chart.png)\n",
"\n",
"The dominant encoding at the time became ASCII (for *American Standard Code for Information Interchange*.), which was created on behalf of the U.S. Government in 1963 to allow for information interchange between their different computing systems.\n",
"\n",
"The encoding uses a 7-bit system, which means that they could only store characters in 128 (`2^7=128`) numbers (`0000 0000` until `0111 1111`). The resulting encoding schema assigned to each of these 128 numbers:\n",
" \n",
"* all the letters in the English alphabet\n",
"* numbers from 0-9\n",
"* punctuation marks \n",
"* and control characters \n",
"\n",
"Thanks to the simplicity of the encoding it quickly became a standard for the American computing industry.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ASCII imperialism\n",
"\n",
"Thanks to the power of the US Military and US corporations the American computing industry became the global computing industry. Computers that we use today are rooted in American networking history, and so is the ASCII standard. However, the reality is that ASCII can only represent 26 Latin letters in the English alphabet but computers are used all over the world, by people speaking different languages. They would often end up with American computers that could not represent their language in ASCII. Think for example of scripts like Greek, Cyrillic and Arabic or even Latin scripts that use accents such as the `ü` or `ø`. Altough 128 might sound like a lot of characters, it is not enough to represent all different languages."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise - the limits of ASCII\n",
"\n",
"Not all the characters fit within 128 or even 256 bits. \n",
"\n",
"Try this for example:\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Traceback (most recent call last):\n",
" File \"<string>\", line 1, in <module>\n",
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)\n"
]
}
],
"source": [
"! python2.7 -c \"print 'ø'.encode('ascii')\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For a time people used the 8th bit, numbers `1000 0000` to `1111 1111` (or 128 to 256) to encode the specific parts of their own language. That way there was an overlap with ASCII but the own language could also be encoded. \n",
"\n",
"A list of all the 128 ASCII characters, and their corresponding numbers can be seen in this table:\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ASCII(7) Linux Programmer's Manual ASCII(7)\n",
"\n",
"NAME\n",
" ascii - ASCII character set encoded in octal, decimal, and hexadecimal\n",
"\n",
"DESCRIPTION\n",
" ASCII is the American Standard Code for Information Interchange. It is\n",
" a 7-bit code. Many 8-bit codes (e.g., ISO 8859-1) contain ASCII as\n",
" their lower half. The international counterpart of ASCII is known as\n",
" ISO 646-IRV.\n",
"\n",
" The following table contains the 128 ASCII characters.\n",
"\n",
" C program '\\X' escapes are noted.\n",
"\n",
" Oct Dec Hex Char Oct Dec Hex Char\n",
" ────────────────────────────────────────────────────────────────────────\n",
" 000 0 00 NUL '\\0' (null character) 100 64 40 @\n",
" 001 1 01 SOH (start of heading) 101 65 41 A\n",
" 002 2 02 STX (start of text) 102 66 42 B\n",
" 003 3 03 ETX (end of text) 103 67 43 C\n",
" 004 4 04 EOT (end of transmission) 104 68 44 D\n",
" 005 5 05 ENQ (enquiry) 105 69 45 E\n",
" 006 6 06 ACK (acknowledge) 106 70 46 F\n",
" 007 7 07 BEL '\\a' (bell) 107 71 47 G\n",
" 010 8 08 BS '\\b' (backspace) 110 72 48 H\n",
" 011 9 09 HT '\\t' (horizontal tab) 111 73 49 I\n",
" 012 10 0A LF '\\n' (new line) 112 74 4A J\n",
" 013 11 0B VT '\\v' (vertical tab) 113 75 4B K\n",
" 014 12 0C FF '\\f' (form feed) 114 76 4C L\n",
" 015 13 0D CR '\\r' (carriage ret) 115 77 4D M\n",
" 016 14 0E SO (shift out) 116 78 4E N\n",
" 017 15 0F SI (shift in) 117 79 4F O\n",
" 020 16 10 DLE (data link escape) 120 80 50 P\n",
" 021 17 11 DC1 (device control 1) 121 81 51 Q\n",
" 022 18 12 DC2 (device control 2) 122 82 52 R\n",
" 023 19 13 DC3 (device control 3) 123 83 53 S\n",
" 024 20 14 DC4 (device control 4) 124 84 54 T\n",
" 025 21 15 NAK (negative ack.) 125 85 55 U\n",
" 026 22 16 SYN (synchronous idle) 126 86 56 V\n",
" 027 23 17 ETB (end of trans. blk) 127 87 57 W\n",
" 030 24 18 CAN (cancel) 130 88 58 X\n",
" 031 25 19 EM (end of medium) 131 89 59 Y\n",
" 032 26 1A SUB (substitute) 132 90 5A Z\n",
" 033 27 1B ESC (escape) 133 91 5B [\n",
" 034 28 1C FS (file separator) 134 92 5C \\ '\\\\'\n",
" 035 29 1D GS (group separator) 135 93 5D ]\n",
" 036 30 1E RS (record separator) 136 94 5E ^\n",
" 037 31 1F US (unit separator) 137 95 5F _\n",
" 040 32 20 SPACE 140 96 60 `\n",
" 041 33 21 ! 141 97 61 a\n",
" 042 34 22 \" 142 98 62 b\n",
" 043 35 23 # 143 99 63 c\n",
" 044 36 24 $ 144 100 64 d\n",
" 045 37 25 % 145 101 65 e\n",
" 046 38 26 & 146 102 66 f\n",
" 047 39 27 ' 147 103 67 g\n",
" 050 40 28 ( 150 104 68 h\n",
" 051 41 29 ) 151 105 69 i\n",
" 052 42 2A * 152 106 6A j\n",
" 053 43 2B + 153 107 6B k\n",
" 054 44 2C , 154 108 6C l\n",
" 055 45 2D - 155 109 6D m\n",
"\n",
" 056 46 2E . 156 110 6E n\n",
" 057 47 2F / 157 111 6F o\n",
" 060 48 30 0 160 112 70 p\n",
" 061 49 31 1 161 113 71 q\n",
" 062 50 32 2 162 114 72 r\n",
" 063 51 33 3 163 115 73 s\n",
" 064 52 34 4 164 116 74 t\n",
" 065 53 35 5 165 117 75 u\n",
" 066 54 36 6 166 118 76 v\n",
" 067 55 37 7 167 119 77 w\n",
" 070 56 38 8 170 120 78 x\n",
" 071 57 39 9 171 121 79 y\n",
" 072 58 3A : 172 122 7A z\n",
" 073 59 3B ; 173 123 7B {\n",
" 074 60 3C < 174 124 7C |\n",
" 075 61 3D = 175 125 7D }\n",
" 076 62 3E > 176 126 7E ~\n",
" 077 63 3F ? 177 127 7F DEL\n",
"\n",
" Tables\n",
" For convenience, below are more compact tables in hex and decimal.\n",
"\n",
" 2 3 4 5 6 7 30 40 50 60 70 80 90 100 110 120\n",
" ------------- ---------------------------------\n",
" 0: 0 @ P ` p 0: ( 2 < F P Z d n x\n",
" 1: ! 1 A Q a q 1: ) 3 = G Q [ e o y\n",
" 2: \" 2 B R b r 2: * 4 > H R \\ f p z\n",
" 3: # 3 C S c s 3: ! + 5 ? I S ] g q {\n",
" 4: $ 4 D T d t 4: \" , 6 @ J T ^ h r |\n",
" 5: % 5 E U e u 5: # - 7 A K U _ i s }\n",
" 6: & 6 F V f v 6: $ . 8 B L V ` j t ~\n",
" 7: ' 7 G W g w 7: % / 9 C M W a k u DEL\n",
" 8: ( 8 H X h x 8: & 0 : D N X b l v\n",
" 9: ) 9 I Y i y 9: ' 1 ; E O Y c m w\n",
" A: * : J Z j z\n",
" B: + ; K [ k {\n",
" C: , < L \\ l |\n",
" D: - = M ] m }\n",
" E: . > N ^ n ~\n",
" F: / ? O _ o DEL\n",
"\n",
"NOTES\n",
" History\n",
" An ascii manual page appeared in Version 7 of AT&T UNIX.\n",
"\n",
" On older terminals, the underscore code is displayed as a left arrow,\n",
" called backarrow, the caret is displayed as an up-arrow and the verti\n",
" cal bar has a hole in the middle.\n",
"\n",
" Uppercase and lowercase characters differ by just one bit and the ASCII\n",
" character 2 differs from the double quote by just one bit, too. That\n",
" made it much easier to encode characters mechanically or with a non-mi\n",
" crocontroller-based electronic keyboard and that pairing was found on\n",
" old teletypes.\n",
"\n",
" The ASCII standard was published by the United States of America Stan\n",
" dards Institute (USASI) in 1968.\n",
"\n",
"SEE ALSO\n",
" charsets(7), iso_8859-1(7), iso_8859-10(7), iso_8859-11(7),\n",
" iso_8859-13(7), iso_8859-14(7), iso_8859-15(7), iso_8859-16(7),\n",
" iso_8859-2(7), iso_8859-3(7), iso_8859-4(7), iso_8859-5(7),\n",
" iso_8859-6(7), iso_8859-7(7), iso_8859-8(7), iso_8859-9(7), utf-8(7)\n",
"\n",
"COLOPHON\n",
" This page is part of release 4.16 of the Linux man-pages project. A\n",
" description of the project, information about reporting bugs, and the\n",
" latest version of this page, can be found at\n",
" https://www.kernel.org/doc/man-pages/.\n",
"\n",
"Linux 2016-10-08 ASCII(7)\n"
]
}
],
"source": [
"! man ascii"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise - decode binary into ASCII\n",
"\n",
"Use an ASCII code table and decode the following binary code:\n",
"\n",
" 0100 1000\n",
" 0110 0101\n",
" 0110 1100\n",
" 0110 1100\n",
" 0110 1111\n",
" 0010 0000\n",
" 0101 0111\n",
" 0110 1111\n",
" 0111 0010\n",
" 0110 1100\n",
" 0110 0100\n",
" 0010 0001"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ASCII flavours: PETSCII\n",
"\n",
"### Commodore 64 (1982)\n",
"\n",
"![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Commodore-64-Computer-FL.jpg/320px-Commodore-64-Computer-FL.jpg)\n",
"\n",
"> The Commodore 64, also known as the C64 or the CBM 64, is an 8-bit home computer introduced in January 1982 by Commodore International (first shown at the Consumer Electronics Show, January 710, 1982, in Las Vegas). It has been listed in the Guinness World Records as the highest-selling single computer model of all time, with independent estimates placing the number sold between 12.5 and 17 million units. \n",
"\n",
"> Preceded by the Commodore VIC-20 and Commodore PET, the C64 took its name from its 64 kilobytes (65,536 bytes) of RAM. With support for multicolor sprites and a custom chip for waveform generation, the C64 could create superior visuals and audio compared to systems without such custom hardware. \n",
"\n",
"https://en.wikipedia.org/wiki/Commodore_64\n",
"\n",
"> Part of the Commodore 64's success was its sale in regular retail stores instead of only electronics or computer hobbyist specialty stores. Commodore produced many of its parts in-house to control costs, including custom integrated circuit chips from MOS Technology. In the United States, it has been compared to the Ford Model T automobile for its role in bringing a new technology to middle-class households via creative and affordable mass-production.\n",
"\n",
"Kahney, Leander (September 9, 2003). \"Grandiose Price for a Modest PC\". CondéNet, Inc. Archived from the original on September 14, 2008. Retrieved September 13, 2008.\n",
"\n",
"![](https://upload.wikimedia.org/wikipedia/commons/4/48/C64_startup_animiert.gif)\n",
"\n",
"### PETSCII \n",
"\n",
"![](https://www.pagetable.com/docs/c64ref_charset/colorscheme.gif)\n",
"\n",
"> The Commodore PET's lack of a programmable bitmap-mode for computer graphics, as well as it having no redefinable character set capability, may be one of the reasons PETSCII was developed; by creatively using the well-thought-out block graphics, a higher degree of sophistication in screen graphics is attainable than by using plain ASCII's letter/digit/punctuation characters. In addition to the relatively diverse set of geometrical shapes that can thus be produced, PETSCII allows for several grayscale levels by its provision of differently hatched checkerboard squares/half-squares. Finally, the reverse-video mode (see below) is used to complete the range of graphics characters, in that it provides mirrored half-square blocks. \n",
"\n",
"https://en.wikipedia.org/wiki/PETSCII\n",
"\n",
"Draw PETSCII art in the browser:\n",
"\n",
"* https://petscii.krissz.hu/\n",
"* https://www.masswerk.at/pet/\n",
"\n",
"Use PETSCII as a font!\n",
"\n",
"* https://style64.org/c64-truetype\n",
"\n",
"PETSCII bots!\n",
"\n",
"* https://twitter.com/PETSCIIBOTS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Unicode universalism\n",
"\n",
"> 'As electronic text was increasingly being exchanged online and between language areas, issues emerged when text encoded in one language was shared and read on systems assuming an encoding in another language. Unicode was a response to the incompatible text encoding standards that were proliferating. \n",
"> \n",
"> When different encodings assign the same binary numbers to different characters, this results in illegible documents. The solution, partly made possible by increased computing capacity, was to strive for a single universal encoding which would encompass all writing systems' \n",
"> \n",
"> (Roel Roscam Abbing, Peggy Pierrot, Femke Snelting (2016), [*Modifying the Universal*](http://roelof.info/~r/DB06_Executing_Practices_Modifiying_the_Universal_Pierrot_Roscam_Abbing_Snelting.pdf))\n",
"\n",
"You can experience this following the \"break Yahoo\" exercise below.\n",
"\n",
"So in order to overcome the limitations of ASCII people created the Unicode Consortium to create a single universal character encoding:\n",
"\n",
"> 'The Unicode standards are designed to normalise the encoding of characters, to efficiently manage the way they are stored, referred to and displayed in order to facilitate cross-platform, multilingual and international text exchange. The Unicode Standard is mammoth in size and covers well over 110,000 characters, of which [..] 1,000 are [..] emoji.' \n",
"> \n",
"> (Roel Roscam Abbing, Peggy Pierrot, Femke Snelting (2016), [*Modifying the Universal*](http://roelof.info/~r/DB06_Executing_Practices_Modifiying_the_Universal_Pierrot_Roscam_Abbing_Snelting.pdf))\n",
"\n",
"In effect the Unicode Standard combined all the different national character encodings together into a single large ledger in order to try to represent all languages. It is divided in so called blocks, which are basically number tables that describe which number is connected to which character. The table starts counting at `0x0` and continues all the way up to `0x10FFFF`. \n",
"\n",
"The first block actually corresponds with ASCII: <https://en.wikibooks.org/wiki/Unicode/Character_reference/0000-0FFF>\n",
"\n",
"It contains many different scripts for supporting large and smaller language groups, including for example Ethiopian and Cherokee: <https://en.wikibooks.org/wiki/Unicode/Character_reference/1000-1FFF>\n",
"\n",
"However there are also blocks that describe Arrows and other symbols: <https://en.wikibooks.org/wiki/Unicode/Character_reference/2000-2FFF>\n",
" \n",
"Emoji are also part of the unicode table. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## From Unicode codepoint, to character, to glyph\n",
"\n",
"![Image representing a Unicode codepoint, a character and various glyphs](https://vvvvvvaria.org/~r/codepointglyph.png)\n",
"\n",
"In the Unicode standard every text character has a representation as a number or codepoint. The standard defines what codepoint is connected to what character, but not what *glyph* should look like. That is left to individual font designers.\n",
"\n",
"Next to the letters, there are many control characters that are used for example to display text from right to left and reverse or to join two separate characters together into one (as happens with Asian language scripts)\n",
"\n",
"One of the curious things about Unicode is that there are many homographs (characters look identical, have different code points).\n",
"\n",
"For example:\n",
"Greek `Ο`, Latin `O`, and Cyrillic `О` are identical to the eye, but different to the computer.\n",
"\n",
"You can tell when you take a closer look:\n",
" \n",
"`Ο` = `0x39f` for Greek \n",
"`O` = `0x4f` for Latin\n",
"`О` = `0x41e` for Cyrillic\n",
" \n",
"Try to copy the Greek or Cyrillic `О` and search for it in the document by pressing `ctrl + f` and entering it in the search bar. Then do the same with the Latin O."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise - generating \"Unicode-codepoint-art\"\n",
"\n",
"Here is a piece of python code that will fill try to print out all Unicode characters by counting from `0x0` to `0x10FFFF` and converting that into a printable character:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\n",
"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\n",
"\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\u0002\n",
"\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\n",
"\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\u0004\n",
"\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\u0005\n",
"\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\u0006\n",
"\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\u0007\n",
"\n",
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\u000b",
"\n",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\f",
"\n",
"\n",
"\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\n",
"\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\u000f\n",
"\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\u0010\n",
"\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\u0011\n",
"\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\u0012\n",
"\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\u0013\n",
"\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\u0014\n",
"\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\u0015\n",
"\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\u0016\n",
"\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\u0017\n",
"\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\u0018\n",
"\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\u0019\n",
"\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\u001a\n",
"\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\u001b\n",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\u001c",
"\n",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\u001d",
"\n",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\u001e",
"\n",
"\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\u001f\n",
" \n",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",
"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n",
"################################################################################\n",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n",
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n",
"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n",
"((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\n",
"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n",
"********************************************************************************\n",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n",
"--------------------------------------------------------------------------------\n",
"................................................................................\n",
"////////////////////////////////////////////////////////////////////////////////\n",
"00000000000000000000000000000000000000000000000000000000000000000000000000000000\n",
"11111111111111111111111111111111111111111111111111111111111111111111111111111111\n",
"22222222222222222222222222222222222222222222222222222222222222222222222222222222\n",
"33333333333333333333333333333333333333333333333333333333333333333333333333333333\n",
"44444444444444444444444444444444444444444444444444444444444444444444444444444444\n",
"55555555555555555555555555555555555555555555555555555555555555555555555555555555\n",
"66666666666666666666666666666666666666666666666666666666666666666666666666666666\n",
"77777777777777777777777777777777777777777777777777777777777777777777777777777777\n",
"88888888888888888888888888888888888888888888888888888888888888888888888888888888\n",
"99999999999999999999999999999999999999999999999999999999999999999999999999999999\n",
"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n",
";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n",
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
"================================================================================\n",
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n",
"????????????????????????????????????????????????????????????????????????????????\n",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n",
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n",
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n",
"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\n",
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\n",
"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n",
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n",
"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\n",
"HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH\n",
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII\n",
"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ\n",
"KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\n",
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL\n",
"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n",
"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\n",
"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\n",
"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\n",
"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\n",
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n",
"SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\n",
"TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\n",
"UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\n",
"VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n",
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW\n",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n",
"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n",
"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\n",
"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\n",
"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n",
"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n",
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
"________________________________________________________________________________\n",
"````````````````````````````````````````````````````````````````````````````````\n",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n",
"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\n",
"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\n",
"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n",
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n",
"gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg\n",
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh\n",
"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\n",
"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj\n",
"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk\n",
"llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll\n",
"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\n",
"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n",
"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n",
"pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp\n",
"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n",
"rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\n",
"ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\n",
"tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt\n",
"^C\n",
"Traceback (most recent call last):\n",
" File \"<string>\", line 1, in <module>\n",
" File \"<string>\", line 6, in <module>\n",
"KeyboardInterrupt\n"
]
}
],
"source": [
"! python -c 'exec \"\"\"\\nimport time\\nwhile True:\\n for i in range(0x0,0x10FFFF):\\n print unichr(i)*80\\n time.sleep(0.05)\\n\"\"\"'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With this technique it is also possible to make animations:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"🌑🌑🌑🌑🌑🌑🌑🌑🌑🌑\n",
"🌒🌒🌒🌒🌒🌒🌒🌒🌒🌒\n",
"🌓🌓🌓🌓🌓🌓🌓🌓🌓🌓\n",
"🌔🌔🌔🌔🌔🌔🌔🌔🌔🌔\n",
"🌕🌕🌕🌕🌕🌕🌕🌕🌕🌕\n",
"🌖🌖🌖🌖🌖🌖🌖🌖🌖🌖\n",
"🌗🌗🌗🌗🌗🌗🌗🌗🌗🌗\n",
"🌑🌑🌑🌑🌑🌑🌑🌑🌑🌑\n",
"🌒🌒🌒🌒🌒🌒🌒🌒🌒🌒\n",
"🌓🌓🌓🌓🌓🌓🌓🌓🌓🌓\n",
"🌔🌔🌔🌔🌔🌔🌔🌔🌔🌔\n",
"🌕🌕🌕🌕🌕🌕🌕🌕🌕🌕\n",
"🌖🌖🌖🌖🌖🌖🌖🌖🌖🌖\n",
"🌗🌗🌗🌗🌗🌗🌗🌗🌗🌗\n",
"🌑🌑🌑🌑🌑🌑🌑🌑🌑🌑\n",
"🌒🌒🌒🌒🌒🌒🌒🌒🌒🌒\n",
"🌓🌓🌓🌓🌓🌓🌓🌓🌓🌓\n",
"🌔🌔🌔🌔🌔🌔🌔🌔🌔🌔\n",
"🌕🌕🌕🌕🌕🌕🌕🌕🌕🌕\n",
"🌖🌖🌖🌖🌖🌖🌖🌖🌖🌖\n",
"🌗🌗🌗🌗🌗🌗🌗🌗🌗🌗\n",
"🌑🌑🌑🌑🌑🌑🌑🌑🌑🌑\n",
"🌒🌒🌒🌒🌒🌒🌒🌒🌒🌒\n",
"🌓🌓🌓🌓🌓🌓🌓🌓🌓🌓\n",
"🌔🌔🌔🌔🌔🌔🌔🌔🌔🌔\n",
"🌕🌕🌕🌕🌕🌕🌕🌕🌕🌕\n",
"🌖🌖🌖🌖🌖🌖🌖🌖🌖🌖\n",
"🌗🌗🌗🌗🌗🌗🌗🌗🌗🌗\n",
"🌑🌑🌑🌑🌑🌑🌑🌑🌑🌑\n",
"🌒🌒🌒🌒🌒🌒🌒🌒🌒🌒\n",
"🌓🌓🌓🌓🌓🌓🌓🌓🌓🌓\n",
"🌕🌕🌕🌕🌕🌕🌕🌕🌕🌕\n",
"^C\n",
"Traceback (most recent call last):\n",
" File \"<string>\", line 1, in <module>\n",
" File \"<string>\", line 6, in <module>\n",
"KeyboardInterrupt\n"
]
}
],
"source": [
"! python -c 'exec \"\"\"\\nimport time\\nwhile True:\\n for i in range(127761,127768):\\n print unichr(i)*10\\n time.sleep(0.05)\\n\"\"\"'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exercise - what does a japanese website look like in ASCII?\n",
"\n",
"1. Go to [https://www.yahoo.co.jp/](https://www.yahoo.co.jp/) in your browser.\n",
"2. Save the page to your computer. You could use `CMD+S` or `CTRL+S` for this.\n",
"3. Open the page in a text editor.\n",
"4. Edit line 3 of the file: `<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">` and change the encoding of the document from `UTF-8` into `ASCII`.\n",
"5. Open the page.\n",
"\n",
"You have now Mojibaked the page!\n",
"\n",
"([Mojibake article on Wikipedia](https://en.wikipedia.org/wiki/Mojibake))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}