Tag Archives: Unicode

Go UTF-16

This is just a small code fragment that prints out the Unicode characters from the Fullwidth Latin Letters (range 0xFF01-0xFFEF). This works on little & big endian machines (tested with qemu-arm & qemu-mips compiled using gccgo 4.7.) I thought it might have issues with the way it decodes the int32 into a byte array and re-encodes it to a uint16 array. package main import ( "bytes" "encoding/binary" "fmt" "unicode/utf16" ) func main() { for i := int32(0xFF00); i