Thanks for your answer. I'm not experienced at all with this kind of programming. I tried to change utf8 to utf16 but still no luck. ck_assert_msg is provided by the check pkg.

This is the code in question:

START_TEST(test_cli_codepage_to_utf8_jis)
{
    cl_error_t ret;
    char *utf8       = NULL;
    size_t utf8_size = 0;

    ret = cli_codepage_to_utf8("\x82\xB1\x82\xF1\x82\xC9\x82\xBF\x82\xCD", 10, CODEPAGE_JAPANESE_SHIFT_JIS, &utf8, &utf8_size);     ck_assert_msg(CL_SUCCESS == ret, "test_cli_codepage_to_utf8: Failed to convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: ret != SUCCESS!");     ck_assert_msg(NULL != utf8, "sanitize_path: Failed to convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: utf8 pointer is NULL!");     ck_assert_msg(0 == strcmp(utf8, "▒~A~S▒~B~S▒~A▒▒~A▒▒~A▒"), "sanitize_path: '%s' doesn't match '%s'", utf8, "▒~A~S▒~B~S▒~A▒▒~A▒▒~A▒");

    if (NULL != utf8) {
        free(utf8);
        utf8 = NULL;
    }
}
END_TEST

But maybe this code page is simply not supported by openindiana because I tried to play around with iconv, too (it seems there is nothing similar to JAPANESE_SHIFT_JIS) :

v$ iconv -l
The following are all supported code set names.  All combinations
of those names are not necessarily available for the pair of the
fromcode-tocode.  Some of those code set names have aliases, which
are case-insensitive and described in parentheses following the
canonical name:

    646 (ASCII, US-ASCII, US_ASCII, USASCII),
    646da,
    646de,
    646en,
    646es,
    646fr,
    646it,
    646sv,
    8859,
    8859-1 (ISO8859-1, ISO-8859-1, ISO8859_1, ISO_8859_1),
    8859-10 (ISO8859-10, ISO8859_10, ISO-8859-10, ISO_8859_10),
    8859-13 (ISO8859-13, ISO8859_13, ISO-8859-13, ISO_8859_13),
    8859-14 (ISO8859-14, ISO8859_14, ISO-8859-14, ISO_8859_14),
    8859-15 (ISO8859-15, ISO-8859-15, ISO8859_15, ISO_8859_15),
    8859-16 (ISO8859-16, ISO8859_16, ISO-8859-16, ISO_8859_16),
    8859-2 (ISO8859-2, ISO8859_2, ISO-8859-2, ISO_8859_2, iso2),
    8859-3 (ISO8859-3, ISO8859_3, ISO-8859-3, ISO_8859_3),
    8859-4 (ISO8859-4, ISO8859_4, ISO-8859-4, ISO_8859_4),
    8859-5 (ISO8859-5, ISO8859_5, ISO-8859-5, ISO_8859_5, iso5),
    8859-6 (ISO8859-6, ISO8859_6, ISO-8859-6, ISO_8859_6),
    8859-7 (ISO8859-7, ISO8859_7, ISO-8859-7, ISO_8859_7),
    8859-8 (ISO8859-8, ISO8859_8, ISO-8859-8, ISO_8859_8),
    8859-9 (ISO8859-9, ISO8859_9, ISO-8859-9, ISO_8859_9),
    ACE (ACE),
    ACE-ALLOW-UNASSIGNED (ACE-ALLOW-UNASSIGNED, ACE_ALLOW_UNASSIGNED, ACEALLOWUNASSIGNED),
    BIG5,
    CP1250 (CP1250, CP-1250, CP_1250, WINDOWS-1250, ANSI-1250, ANSI1250, 1250, win2),     CP1251 (CP1251, CP-1251, CP_1251, WINDOWS-1251, ANSI-1251, ANSI1251, 1251, win5),     CP1252 (CP1252, CP-1252, CP_1252, WINDOWS-1252, ANSI-1252, ANSI1252, 1252),     CP1253 (CP1253, CP-1253, CP_1253, WINDOWS-1253, ANSI-1253, ANSI1253, 1253),     CP1254 (CP1254, CP-1254, CP_1254, WINDOWS-1254, ANSI-1254, ANSI1254, 1254),     CP1255 (CP1255, CP-1255, CP_1255, WINDOWS-1255, ANSI-1255, ANSI1255, 1255),     CP1256 (CP1256, CP-1256, CP_1256, WINDOWS-1256, ANSI-1256, ANSI1256, 1256),     CP1257 (CP1257, CP-1257, CP_1257, WINDOWS-1257, ANSI-1257, ANSI1257, 1257),     CP1258 (CP1258, CP-1258, CP_1258, WINDOWS-1258, ANSI-1258, ANSI1258, 1258),
    CP437 (CP437, CP-437, CP_437, 437),
    CP720 (CP720, CP-720, CP_720, 720),
    CP737 (CP737, CP-737, CP_737, 737),
    CP775 (CP775, CP-775, CP_775, 775),
    CP850 (CP850, CP-850, CP_850, 850),
    CP852 (CP852, CP-852, CP_852, 852, dos2),
    CP855 (CP855, CP-855, CP_855, 855),
    CP857 (CP857, CP-857, CP_857, 857),
    CP860 (CP860, CP-860, CP_860, 860),
    CP861 (CP861, CP-861, CP_861, 861),
    CP862 (CP862, CP-862, CP_862, 862),
    CP863 (CP863, CP-863, CP_863, 863),
    CP864 (CP864, CP-864, CP_864, 864),
    CP865 (CP865, CP-865, CP_865, 865),
    CP866 (CP866, CP-866, CP_866, 866),
    CP869 (CP869, CP-869, CP_869, 869),
    CP874 (CP874, CP-874, CP_874, 874),
    GB18030,
    GBK,
    IBM-037,
    IBM-1025,
    IBM-1026,
    IBM-1112,
    IBM-1122,
    IBM-1140,
    IBM-1141,
    IBM-1142,
    IBM-1143,
    IBM-1144,
    IBM-1145,
    IBM-1146,
    IBM-1147,
    IBM-1148,
    IBM-1149,
    IBM-273,
    IBM-277,
    IBM-278,
    IBM-280,
    IBM-284,
    IBM-285,
    IBM-297,
    IBM-420,
    IBM-424,
    IBM-500,
    IBM-850 (IBM-850, IBM850),
    IBM-852,
    IBM-855,
    IBM-856,
    IBM-857,
    IBM-862,
    IBM-864,
    IBM-866,
    IBM-869,
    IBM-870,
    IBM-871,
    IBM-875,
    IBM-921,
    IBM-922,
    ISO646,
    ISO8859-1,
    KOI8-R (KOI8-R, KOI8_R, KOI8R, KOI8),
    KOI8-U (KOI8-U, KOI8_U, KOI8U),
    PTCP154 (PTCP154),
    UCS-2 (UCS-2, UCS_2, UCS2),
    UCS-2BE (UCS-2BE, UCS_2BE, UCS2BE),
    UCS-2LE (UCS-2LE, UCS_2LE, UCS2LE),
    UCS-4 (UCS-4, UCS_4, UCS4),
    UCS-4BE (UCS-4BE, UCS_4BE, UCS4BE),
    UCS-4LE (UCS-4LE, UCS_4LE, UCS4LE),
    UTF-16 (UTF-16, UTF16, UTF_16),
    UTF-16BE (UTF-16BE, UTF16BE, UTF_16BE),
    UTF-16LE (UTF-16LE, UTF16LE, UTF_16LE),
    UTF-32 (UTF-32, UTF32, UTF_32),
    UTF-32BE (UTF-32BE, UTF32BE, UTF_32BE),
    UTF-32LE (UTF-32LE, UTF32LE, UTF_32LE),
    UTF-7,
    UTF-8 (UTF-8, UTF8, UTF_8),
    UTF-EBCDIC (UTF-EBCDIC, UTF_EBCDIC, UTFEBCDIC),
    eucJP (eucJP, EUC-JP, EUC_JP),
    eucTH (ISO8859-11, ISO8859_11, ISO-8859-11, ISO_8859_11, 8859-11, 8859_11, TIS-620, TIS_620, TIS620, TIS620.2533, TIS620:2533, TIS620-2533, TIS620_2533, eucTH, EUC-TH, EUC_TH),
    zh_CN.gb18030,
    zh_CN.gbk (GB18030, GB-18030, GB_18030, GBK, zh_CN.gb18030),
    zh_TW-big5 (BIG5, BIG-5, BIG_5, zh_TW.big5),
    zh_TW.big5,

Am 11.01.2022 um 19:09 schrieb Chris:
On 2022-01-11 10:02, Chris wrote:
On 2022-01-11 09:16, Friedrich Kink via oi-dev wrote:
Hi all,

I prepared the clamav update to the latest version and everything works fine as
expected. But one of out of all tests is failing with this error:

99%: Checks: 1175, Failures: 1, Errors: 0
/usr/src/oi-userland/components/sysutils/clamav/clamav-0.104.1/unit_tests/check_clamav.c:1707:F:assorted functions:test_cli_codepage_to_utf8_jis:0: test_cli_codepage_to_utf8: Failed to
convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: ret != SUCCESS!
NOTICE: Use the 'T' environment variable to adjust testcase timeout

 Does anyone have experience Japanese code pages? Is this something which needs
more detailed investigation?
Just a hunch here; but don't Japanese characters use joiners to combine 2 utf8 symbols?
IOW shouldn't that be uft16?
Ahem... I meant utf16, not uft.

Sorry. :-/

HTH

-- Chris

kind regards,

  Fritz

_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev

_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev


_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev
_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to