Skip to content

Instantly share code, notes, and snippets.

@shlomiv
Created January 30, 2017 20:10
Show Gist options
  • Save shlomiv/c763cca78dcc4062b22c0cdac49a9560 to your computer and use it in GitHub Desktop.
Save shlomiv/c763cca78dcc4062b22c0cdac49a9560 to your computer and use it in GitHub Desktop.
(def cps (map (fn[[a x]] (.displayName x)) (java.nio.charset.Charset/availableCharsets)))
(def s (slurp "test.txt"))
(time (with-open [w (io/writer "all-codes1")]
(doseq [f cps
t cps]
(try
(.write w (str f "->" t))
(.write w (String. (.getBytes s f) t))
(.write w "\n\n")
(catch Throwable e)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment