engines/adva_cms/vendor/plugins/stringex/lib/lucky_sneaks/unidecoder.rb
# Returns string with its UTF-8 characters transliterated to ASCII ones
# 
# You're probably better off just using the added String#to_ascii
Returns string with its UTF-8 characters transliterated to ASCII ones
You're probably better off just using the added String#to_ascii
Returns string with its UTF - 8 characters transliterated to ASCII ones You ' re probably better off just using the added String#to_ascii
def decode(string)
        string.gsub(/[^\x00-\x7f]/u) do |codepoint|
          unpacked = codepoint.unpack("U")[0]
          begin
            CODEPOINTS[code_group(unpacked)][grouped_point(unpacked)]
          rescue
            "?"
          end
        end
      end
def decode ( string ) string . gsub ( / [^ \x00 - \x7f ] /u ) do | codepoint | unpacked = codepoint . unpack ( "U" ) [ 0 ] begin CODEPOINTS [ code_group ( unpacked ) ] [ grouped_point ( unpacked ) ] rescue "?" end end end
Returns string with its UTF-8 characters transliterated to ASCII ones
You're probably better off just using the added String#to_ascii
Returns string with its UTF - 8 characters transliterated to ASCII ones You ' re probably better off just using the added String#to_ascii
# Hopefully this won't come up much
string