When a user agent would otherwise use an encoding given in the first column of the following table to either convert content to Unicode characters or convert Unicode characters to bytes, it must instead use the encoding given in the cell in the second column of the same row.
エンコーディングにShift_JISを指定した場合、Windows-31Jとして扱うのがHTML5的に正しい仕様らしい。