Mega Code Archive
Categories
/
Ruby
/
String
Check the string encoding
# -*- coding: utf-8 -*- s = "2×2=4" # Note multibyte multiplication character s.encoding # =>
t = "2+2=4" # All characters are in the ASCII subset of UTF-8 t.encoding # =>