Skip to content

Instantly share code, notes, and snippets.

@nasser
Created June 16, 2013 21:05
Show Gist options
  • Save nasser/5793440 to your computer and use it in GitHub Desktop.
Save nasser/5793440 to your computer and use it in GitHub Desktop.
Write every graphical Unicode character to a file
# encoding: utf-8
require 'unicode_utils'
File.open('everyunicode.txt', 'w') do |file|
UnicodeUtils::Codepoint::RANGE.each do |i|
file.write("#{UnicodeUtils::Codepoint.new(i).to_s}\t") if UnicodeUtils.code_point_type(i) == :Graphic
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment