Tag: utf-8

Quick Read on UTF-8 in Golang

Raw Strings we create a “raw string”, enclosed by back quotes, so it can contain only literal text. Regular strings, enclosed by double quotes, can contain escape sequences as we showed above. package main import ( “fmt” ) func main() { fmt.Println(`go\\n`) fmt.Println(“escapedGo\\n”) } Output go\\n escapedGo\n Raw string is always UTF-8 because it is part of the Go source…

Notes on String & Encoding Techniques

String and their encoding decide the languages the code can support. Introduction We have many languages and their symbols that need more than 8-bits (ASCII) for binary representation. Encoding adds semantics to a set of bytes. Unicode is a table of all characters and their numeric equivalent. Since there are more than 100k symbols, 8-bits are not enough. What is…