aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/uri_ext_test.rb
blob: 8816b0d392782648b101fd663da291e9826ceaf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

require "abstract_unit"
require "uri"
require "active_support/core_ext/uri"

class URIExtTest < ActiveSupport::TestCase
  def test_uri_decode_handle_multibyte
    str = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E" # Ni-ho-nn-go in UTF-8, means Japanese.

    parser = URI.parser
    assert_equal str, parser.unescape(parser.escape(str))
  end
end