More Ruby 1.9 String Encoding Fun
This commit is contained in:
parent
2c5c6dc78a
commit
faac8951a3
2 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,7 @@ end
|
|||
#--
|
||||
if "".respond_to?(:force_encoding)
|
||||
def purify
|
||||
text = check_ncrs.as_utf8
|
||||
text = self.dup.check_ncrs.as_utf8
|
||||
text.chars.collect{|c| c.as_bytes}.grep(UTF8_REGEX).join.as_utf8
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue