diff --git a/test/xml/test_c14n.rb b/test/xml/test_c14n.rb
index ccab61cedd..379e60f0af 100644
--- a/test/xml/test_c14n.rb
+++ b/test/xml/test_c14n.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
# frozen_string_literal: true
require "helper"
@@ -237,6 +238,21 @@ def test_wrong_params
assert_raises(TypeError) { doc.canonicalize(nil, :wrong_type) }
doc.canonicalize(nil, nil, :wrong_type)
end
+
+ def test_multibyte_unicode
+ # https://github.com/sparklemotion/nokogiri/issues/2410
+ doc = Nokogiri.XML(%{𡏅}, nil, "EUC-JP")
+
+ # I do not understand what's going on here
+ expected = if Nokogiri.jruby?
+ %{𡏅}
+ else
+ %{陝}
+ end
+
+ result = doc.canonicalize
+ assert_equal(expected, result)
+ end
end
end
end