diff --git a/test/html/test_document_encoding.rb b/test/html/test_document_encoding.rb
index 9f6292b9bf..5e664eca1e 100644
--- a/test/html/test_document_encoding.rb
+++ b/test/html/test_document_encoding.rb
@@ -19,7 +19,7 @@ def test_encoding
end
def test_encoding_without_charset
- doc = Nokogiri::HTML File.open(SHIFT_JIS_NO_CHARSET, 'r:cp932:cp932').read
+ doc = Nokogiri::HTML File.open(SHIFT_JIS_NO_CHARSET, 'r:Shift_JIS:Shift_JIS').read
hello = "こんにちは"