<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>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.
<font face="Courier New, Courier, monospace">ck_assert_msg </font>is
provided by the check pkg.<font face="Courier New, Courier,
monospace"><br>
</font></p>
<p>This is the code in question:</p>
<p><font face="monospace">START_TEST(test_cli_codepage_to_utf8_jis)<br>
{<br>
cl_error_t ret;<br>
char *utf8 = NULL;<br>
size_t utf8_size = 0;<br>
<br>
ret =
cli_codepage_to_utf8("\x82\xB1\x82\xF1\x82\xC9\x82\xBF\x82\xCD",
10, CODEPAGE_JAPANESE_SHIFT_JIS, &utf8, &utf8_size);<br>
ck_assert_msg(CL_SUCCESS == ret, "test_cli_codepage_to_utf8:
Failed to convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: ret !=
SUCCESS!");<br>
ck_assert_msg(NULL != utf8, "sanitize_path: Failed to
convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: utf8 pointer is
NULL!");<br>
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▒");<br>
<br>
if (NULL != utf8) {<br>
free(utf8);<br>
utf8 = NULL;<br>
}<br>
}<br>
END_TEST</font><br>
</p>
<p>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 <font face="monospace">JAPANESE_SHIFT_JIS</font>)
:</p>
<p><font face="monospace">v$ iconv -l<br>
The following are all supported code set names. All
combinations<br>
of those names are not necessarily available for the pair of the<br>
fromcode-tocode. Some of those code set names have aliases,
which<br>
are case-insensitive and described in parentheses following the<br>
canonical name:<br>
<br>
646 (ASCII, US-ASCII, US_ASCII, USASCII),<br>
646da,<br>
646de,<br>
646en,<br>
646es,<br>
646fr,<br>
646it,<br>
646sv,<br>
8859,<br>
8859-1 (ISO8859-1, ISO-8859-1, ISO8859_1, ISO_8859_1),<br>
8859-10 (ISO8859-10, ISO8859_10, ISO-8859-10, ISO_8859_10),<br>
8859-13 (ISO8859-13, ISO8859_13, ISO-8859-13, ISO_8859_13),<br>
8859-14 (ISO8859-14, ISO8859_14, ISO-8859-14, ISO_8859_14),<br>
8859-15 (ISO8859-15, ISO-8859-15, ISO8859_15, ISO_8859_15),<br>
8859-16 (ISO8859-16, ISO8859_16, ISO-8859-16, ISO_8859_16),<br>
8859-2 (ISO8859-2, ISO8859_2, ISO-8859-2, ISO_8859_2, iso2),<br>
8859-3 (ISO8859-3, ISO8859_3, ISO-8859-3, ISO_8859_3),<br>
8859-4 (ISO8859-4, ISO8859_4, ISO-8859-4, ISO_8859_4),<br>
8859-5 (ISO8859-5, ISO8859_5, ISO-8859-5, ISO_8859_5, iso5),<br>
8859-6 (ISO8859-6, ISO8859_6, ISO-8859-6, ISO_8859_6),<br>
8859-7 (ISO8859-7, ISO8859_7, ISO-8859-7, ISO_8859_7),<br>
8859-8 (ISO8859-8, ISO8859_8, ISO-8859-8, ISO_8859_8),<br>
8859-9 (ISO8859-9, ISO8859_9, ISO-8859-9, ISO_8859_9),<br>
ACE (ACE),<br>
ACE-ALLOW-UNASSIGNED (ACE-ALLOW-UNASSIGNED,
ACE_ALLOW_UNASSIGNED, ACEALLOWUNASSIGNED),<br>
BIG5,<br>
CP1250 (CP1250, CP-1250, CP_1250, WINDOWS-1250, ANSI-1250,
ANSI1250, 1250, win2),<br>
CP1251 (CP1251, CP-1251, CP_1251, WINDOWS-1251, ANSI-1251,
ANSI1251, 1251, win5),<br>
CP1252 (CP1252, CP-1252, CP_1252, WINDOWS-1252, ANSI-1252,
ANSI1252, 1252),<br>
CP1253 (CP1253, CP-1253, CP_1253, WINDOWS-1253, ANSI-1253,
ANSI1253, 1253),<br>
CP1254 (CP1254, CP-1254, CP_1254, WINDOWS-1254, ANSI-1254,
ANSI1254, 1254),<br>
CP1255 (CP1255, CP-1255, CP_1255, WINDOWS-1255, ANSI-1255,
ANSI1255, 1255),<br>
CP1256 (CP1256, CP-1256, CP_1256, WINDOWS-1256, ANSI-1256,
ANSI1256, 1256),<br>
CP1257 (CP1257, CP-1257, CP_1257, WINDOWS-1257, ANSI-1257,
ANSI1257, 1257),<br>
CP1258 (CP1258, CP-1258, CP_1258, WINDOWS-1258, ANSI-1258,
ANSI1258, 1258),<br>
CP437 (CP437, CP-437, CP_437, 437),<br>
CP720 (CP720, CP-720, CP_720, 720),<br>
CP737 (CP737, CP-737, CP_737, 737),<br>
CP775 (CP775, CP-775, CP_775, 775),<br>
CP850 (CP850, CP-850, CP_850, 850),<br>
CP852 (CP852, CP-852, CP_852, 852, dos2),<br>
CP855 (CP855, CP-855, CP_855, 855),<br>
CP857 (CP857, CP-857, CP_857, 857),<br>
CP860 (CP860, CP-860, CP_860, 860),<br>
CP861 (CP861, CP-861, CP_861, 861),<br>
CP862 (CP862, CP-862, CP_862, 862),<br>
CP863 (CP863, CP-863, CP_863, 863),<br>
CP864 (CP864, CP-864, CP_864, 864),<br>
CP865 (CP865, CP-865, CP_865, 865),<br>
CP866 (CP866, CP-866, CP_866, 866),<br>
CP869 (CP869, CP-869, CP_869, 869),<br>
CP874 (CP874, CP-874, CP_874, 874),<br>
GB18030,<br>
GBK,<br>
IBM-037,</font><br>
<font face="monospace"> IBM-1025,<br>
IBM-1026,<br>
IBM-1112,<br>
IBM-1122,<br>
IBM-1140,<br>
IBM-1141,<br>
IBM-1142,<br>
IBM-1143,<br>
IBM-1144,<br>
IBM-1145,<br>
IBM-1146,<br>
IBM-1147,<br>
IBM-1148,<br>
IBM-1149,<br>
IBM-273,<br>
IBM-277,<br>
IBM-278,<br>
IBM-280,<br>
IBM-284,<br>
IBM-285,<br>
IBM-297,<br>
IBM-420,<br>
IBM-424,<br>
IBM-500,<br>
IBM-850 (IBM-850, IBM850),<br>
IBM-852,<br>
IBM-855,<br>
IBM-856,<br>
IBM-857,<br>
IBM-862,<br>
IBM-864,<br>
IBM-866,<br>
IBM-869,<br>
IBM-870,<br>
IBM-871,<br>
IBM-875,<br>
IBM-921,<br>
IBM-922,<br>
ISO646,<br>
ISO8859-1,<br>
KOI8-R (KOI8-R, KOI8_R, KOI8R, KOI8),<br>
KOI8-U (KOI8-U, KOI8_U, KOI8U),<br>
PTCP154 (PTCP154),<br>
UCS-2 (UCS-2, UCS_2, UCS2),<br>
UCS-2BE (UCS-2BE, UCS_2BE, UCS2BE),<br>
UCS-2LE (UCS-2LE, UCS_2LE, UCS2LE),<br>
UCS-4 (UCS-4, UCS_4, UCS4),<br>
UCS-4BE (UCS-4BE, UCS_4BE, UCS4BE),<br>
UCS-4LE (UCS-4LE, UCS_4LE, UCS4LE),<br>
UTF-16 (UTF-16, UTF16, UTF_16),<br>
UTF-16BE (UTF-16BE, UTF16BE, UTF_16BE),<br>
UTF-16LE (UTF-16LE, UTF16LE, UTF_16LE),<br>
UTF-32 (UTF-32, UTF32, UTF_32),<br>
UTF-32BE (UTF-32BE, UTF32BE, UTF_32BE),<br>
UTF-32LE (UTF-32LE, UTF32LE, UTF_32LE),<br>
UTF-7,<br>
UTF-8 (UTF-8, UTF8, UTF_8),<br>
UTF-EBCDIC (UTF-EBCDIC, UTF_EBCDIC, UTFEBCDIC),<br>
eucJP (eucJP, EUC-JP, EUC_JP),<br>
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),<br>
zh_CN.gb18030,<br>
zh_CN.gbk (GB18030, GB-18030, GB_18030, GBK, zh_CN.gb18030),<br>
zh_TW-big5 (BIG5, BIG-5, BIG_5, zh_TW.big5),<br>
zh_TW.big5,</font><br>
<br>
</p>
<div class="moz-cite-prefix">Am 11.01.2022 um 19:09 schrieb Chris:<br>
</div>
<blockquote type="cite"
cite="mid:4ef88ddd0bf37db49ebf31198c5aab61@sunos.info">On
2022-01-11 10:02, Chris wrote:
<br>
<blockquote type="cite">On 2022-01-11 09:16, Friedrich Kink via
oi-dev wrote:
<br>
<blockquote type="cite">Hi all,
<br>
<br>
I prepared the clamav update to the latest version and
everything works fine as
<br>
expected. But one of out of all tests is failing with this
error:
<br>
<br>
99%: Checks: 1175, Failures: 1, Errors: 0
<br>
/usr/src/oi-userland/components/sysutils/clamav/clamav-0.104.1/unit_tests/check_clamav.c:1707:F:assorted
<br>
functions:test_cli_codepage_to_utf8_jis:0:
test_cli_codepage_to_utf8: Failed to
<br>
convert CODEPAGE_JAPANESE_SHIFT_JIS to UTF8: ret != SUCCESS!
<br>
NOTICE: Use the 'T' environment variable to adjust testcase
timeout
<br>
<br>
Does anyone have experience Japanese code pages? Is this
something which needs
<br>
more detailed investigation?
<br>
</blockquote>
Just a hunch here; but don't Japanese characters use joiners to
combine 2 utf8 symbols?
<br>
IOW shouldn't that be uft16?
<br>
</blockquote>
Ahem... I meant utf16, not uft.
<br>
<br>
Sorry. :-/
<br>
<blockquote type="cite">
<br>
HTH
<br>
<br>
-- Chris
<br>
<blockquote type="cite">
<br>
kind regards,
<br>
<br>
Fritz
<br>
<br>
_______________________________________________
<br>
oi-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
<br>
</blockquote>
<br>
_______________________________________________
<br>
oi-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
<br>
</blockquote>
<br>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
oi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
</pre>
</blockquote>
</body>
</html>