tidy_bytes (ActiveSupport::Multibyte::Chars)

    # File lib/active_support/multibyte/chars.rb, line 610
            def tidy_bytes(string)
              string.split(//u).map do |c|
                if !UTF8_PAT.match(c)
                  n = c.unpack('C')[0]
                  n < 128 ? n.chr :
                  n < 160 ? [UCD.cp1252[n] || n].pack('U') :
                  n < 192 ? "\xC2" + n.chr : "\xC3" + (n-64).chr
                else
                  c
                end
              end.join
            end