Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Commit
  • Loading branch information
StanFromIreland committed Sep 25, 2025
commit c565d52194bb3eef64a8f2b436e9fad0df85125a
3 changes: 1 addition & 2 deletions Lib/test/test_codecencodings_jp.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def test_null_terminator(self):
self.assertEqual(encode_w_null_2.count(b'\x00'), 2)
self.assertEqual(encode_w_null_2, encode_plus_null_2)


class Test_SJISX0213(multibytecodec_support.TestBase, unittest.TestCase):
encoding = 'shift_jisx0213'
tstring = multibytecodec_support.load_teststring('shift_jisx0213')
Expand All @@ -142,6 +141,7 @@ class Test_SJISX0213(multibytecodec_support.TestBase, unittest.TestCase):
"\xab\u211c\xbb = \u2329\u1234\u232a",
b"\x85Gℜ\x85Q = ⟨ሴ⟩"
)

def test_null_terminator(self):
# see gh-101828
cases = (
Expand All @@ -162,6 +162,5 @@ def test_null_terminator(self):
self.assertEqual(encode_w_null_2.count(b'\x00'), 2)
self.assertEqual(encode_w_null_2, encode_plus_null_2)


if __name__ == "__main__":
unittest.main()
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Fix ``'shift_jisx0213'`` and ``'shift_jis_2004'`` codecs truncating null char
as it was treated as part of a multi-character sequence.
Fix ``'shift_jisx0213'`` and ``'shift_jis_2004'`` codecs truncating null chars
as they were treated as part of multi-character sequences.
Loading