Merge this repo with https://github.com/jferard/csvsniffer See https://gist.github.com/msrose/2feacb303035d11d2d05 https://stackoverflow.com/a/10548919/6914441