Skip to content

Instantly share code, notes, and snippets.

@hongruiqi
Created April 14, 2014 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hongruiqi/10615719 to your computer and use it in GitHub Desktop.
Save hongruiqi/10615719 to your computer and use it in GitHub Desktop.
f, err := os.OpenFile("Registry", os.O_RDWR, 0644)
if err != nil {
log.Fatal(err)
}
defer f.Close()
enc := unicode.UTF16(unicode.LittleEndian, unicode.ExpectBOM)
tf := enc.NewDecoder()
tr := transform.NewReader(f, tf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment