0
有人能帮我理解这个Ruby脚本在做什么吗?字节<0xC0字节<0x80
def clean_up dirty_text
newstr = ""
dirty_text.each_byte do |byte|
newstr << if byte < 0x80
byte.chr
elsif byte < 0xC0
"\xC2" + byte.chr
else
"\xC3" + (byte - 64).chr
end
end
newstr
end
谢谢你。我会通过该URL。 – user1494859 2012-07-19 18:45:22