mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Fix a few bugs on cjkcodecs found by Oren Tirosh:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly. - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312 codepoints to conform the standard. - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2 codepoints now.
This commit is contained in:
		
							parent
							
								
									d042132268
								
							
						
					
					
						commit
						199f1db1fa
					
				
					 6 changed files with 53 additions and 28 deletions
				
			
		|  | @ -202,6 +202,12 @@ def test_g2(self): | |||
|         uni = u':hu4:unit\xe9 de famille' | ||||
|         self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni) | ||||
| 
 | ||||
|     def test_iso2022_jp_g0(self): | ||||
|         self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) | ||||
|         for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'): | ||||
|             e = u'\u3406'.encode(encoding) | ||||
|             self.failIf(filter(lambda x: x >= '\x80', e)) | ||||
| 
 | ||||
| def test_main(): | ||||
|     suite = unittest.TestSuite() | ||||
|     suite.addTest(unittest.makeSuite(Test_MultibyteCodec)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hye-Shik Chang
						Hye-Shik Chang