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