Created
September 18, 2017 06:20
-
-
Save tian-im/8d9d28b892d9534c4df9c35c7e384337 to your computer and use it in GitHub Desktop.
Detect non-ASCII charaters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"‐a".each_codepoint do |c| | |
if c & 0xff80 != 0 | |
puts "#{c} is non-ASCII char" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment