Go – Strings, bytes, runes and characters

We’ve come a long way since 8 bit ASCII and EBCDIC. It was an issue with Julia too. Every modern language has to deal with International characters. I guess I need to dive into it because thanks to the Internet and other languages a character is not necessarily one byte. Go Info here. Which also pointed to a post… here which is titled “The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)” which was written in 2003, so that sounds like a good place to start. However he does say “EBCDIC is not relevant to your life.”…that’s what he thinks! I guess I’ll find out what a rune is.

To continue after reading the 2nd article mentioned above. This tidbit is why my Julia program had no problems with ASCII, but did with EBCDIC. In UTF-8, every code point from 0-127 is stored in a single byte. Only code points 128 and above are stored using 2, 3, in fact, up to 6 bytes.