Skip to content

Instantly share code, notes, and snippets.

@ohac
Created September 3, 2008 05:21
Show Gist options
  • Save ohac/8545 to your computer and use it in GitHub Desktop.
Save ohac/8545 to your computer and use it in GitHub Desktop.
nkf guess each line
#!/usr/bin/ruby1.9 -rnkf
module NKF
puts ARGF.file.map{|l|[guess(l),nkf('-w', l)]}.select{|i|i[0]!=ASCII}.join(' ')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment