Ruby - Strings - Encoding

Sort by

recency

|

24 Discussions

|

  • + 0 comments

    Here is ruby - strings - encoding problem solution - https://www.gyangav.com/2022/10/hackerrank-ruby-strings-encoding-problem-solution.html

  • + 0 comments

    Here are the solution of HackerRank Ruby Strings Encoding Solution you can find All HackerRank Ruby Tutorial solutions in Single Post HackerRank Ruby Tutorial solutions

  • + 0 comments
    def transcode(encoded_input_string)
        encoded_input_string.force_encoding(Encoding::UTF_8)
    end
    
    def transcode_to_ISO_8859_1(encoded_input_string)
        encoded_input_string.force_encoding(Encoding::ISO_8859_1)
    end
    transcode(transcode_to_ISO_8859_1("Bhavana"))
    
  • + 0 comments

    What's wrong!

     def transcode a
     a.encode(Encoding::UTF_8)
    end
    
  • + 0 comments

    def transcode(string) string.force_encoding(Encoding::UTF_8) end