@@ -232,7 +232,6 @@ public static function charsetMappingProvider(): array
232232 'ISO-8859-8 ' => ['iso-8859-8 ' , 'hebrew ' ],
233233 'ISO-8859-9 ' => ['iso-8859-9 ' , 'latin5 ' ],
234234 'ISO-8859-13 ' => ['iso-8859-13 ' , 'latin7 ' ],
235- 'UTF-8 ' => ['utf-8 ' , 'utf8mb4 ' ],
236235 'KOI8-R ' => ['koi8-r ' , 'koi8r ' ],
237236 'Windows-1250 ' => ['windows-1250 ' , 'cp1250 ' ],
238237 'Windows-1251 ' => ['windows-1251 ' , 'cp1251 ' ],
@@ -241,8 +240,12 @@ public static function charsetMappingProvider(): array
241240 'Windows-1257 ' => ['windows-1257 ' , 'cp1257 ' ],
242241 'TIS-620 ' => ['tis-620 ' , 'tis620 ' ],
243242 'Shift_JIS ' => ['SHIFT_JIS ' , 'sjis ' ],
243+ 'SJIS ' => ['SJIS ' , 'sjis ' ],
244+ 'SJIS-win ' => ['SJIS-win ' , 'cp932 ' ],
244245 'Big5 ' => ['big5 ' , 'big5 ' ],
245246 'GB2312 ' => ['gb2312 ' , 'gb2312 ' ],
247+ 'euc-jp ' => ['euc-jp ' , 'ujis ' ],
248+ 'ks_c_5601-1987 ' => ['ks_c_5601-1987 ' , 'euckr ' ],
246249 ];
247250 }
248251
@@ -275,15 +278,21 @@ public function testDoImportWithUtf16OnMySql(): void
275278 $ dbi = $ this ->createMock (DatabaseInterface::class);
276279 $ dbi ->method ('quoteString ' )
277280 ->willReturnCallback (static fn (string $ string ): string => "' " . $ string . "' " );
278-
279281 $ dbi ->method ('isMariaDB ' )->willReturn (false );
280282
281283 $ importHandle = new File (ImportSettings::$ importFile );
282284 $ importHandle ->open ();
283285
284- $ this ->getImportLdi ($ dbi )->doImport ($ importHandle );
286+ $ importLdi = $ this ->getImportLdi ($ dbi );
287+ $ result = $ importLdi ->doImport ($ importHandle );
285288
286- self ::assertStringNotContainsString ('CHARACTER SET utf16 ' , Current::$ sqlQuery );
289+ self ::assertSame ([], $ result );
290+ self ::assertTrue (Import::$ hasError );
291+ self ::assertInstanceOf (Message::class, Current::$ message );
292+ self ::assertStringContainsString (
293+ __ ('The selected character set is not supported by the database system. ' ),
294+ Current::$ message ->__toString (),
295+ );
287296 }
288297
289298 public function testDoImportWithUnsupportedCharsetDoesNotAddCharacterSet (): void
0 commit comments