@@ -64,8 +64,8 @@ OFTEST(dcmdata_specificCharacterSet_1)
6464 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 203" ).good ());
6565 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 13 " ).good ());
6666 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 166" ).good ());
67- #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV
68- // (only the ICONV library supports these character sets)
67+ #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV || DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_OFICONV
68+ // (only the [OF] ICONV library supports these character sets)
6969 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 87 " ).good ());
7070 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 159" ).good ());
7171#endif
@@ -89,7 +89,7 @@ OFTEST(dcmdata_specificCharacterSet_1)
8989 OFCHECK (converter.selectCharacterSet (" ISO_IR 192" , " ISO_IR 100 " ).good ());
9090 OFCHECK (converter.selectCharacterSet (" ISO_IR 192" , " ISO 2022 IR 100\\ ISO 2022 IR 126" ).bad ());
9191 } else {
92- // in case there is no libiconv , report a warning but do not fail
92+ // in case there is no conversion library , report a warning but do not fail
9393 DCMDATA_WARN (" Cannot test DcmSpecificCharacterSet since the underlying character set conversion library is not available" );
9494 }
9595}
@@ -116,7 +116,7 @@ OFTEST(dcmdata_specificCharacterSet_2)
116116 converter.clear ();
117117 OFCHECK (converter.convertString (" Some Text" , resultStr).bad ());
118118 } else {
119- // in case there is no libiconv , report a warning but do not fail
119+ // in case there is no conversion library , report a warning but do not fail
120120 DCMDATA_WARN (" Cannot test DcmSpecificCharacterSet since the underlying character set conversion library is not available" );
121121 }
122122}
@@ -128,11 +128,11 @@ OFTEST(dcmdata_specificCharacterSet_3)
128128 if (converter.isConversionAvailable ())
129129 {
130130 OFString resultStr;
131- // we need the PN delimiters for a standard comformant conversion
131+ // we need the PN delimiters for a standard conformant conversion
132132 const OFString delimiters (" \\ ^=" );
133- #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV
133+ #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV || DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_OFICONV
134134 // check whether string conversion from Japanese language to UTF-8 works
135- // (only the ICONV library supports these character sets).
135+ // (only the [OF] ICONV library supports these character sets).
136136 // example taken from DICOM PS 3.5 Annex H.3.1
137137 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 87" ).good ());
138138 OFCHECK (converter.convertString (" Yamada^Tarou=\033 $B;3ED\033 (B^\033 $BB@O:\033 (B=\033 $B$d$^$@\033 (B^\033 $B$?$m$&\033 (B" , resultStr, delimiters).good ());
@@ -176,7 +176,7 @@ OFTEST(dcmdata_specificCharacterSet_3)
176176 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 166" ).good ());
177177 OFCHECK (converter.convertString (" Yamada^Tarou=\033 $B;3ED\033 (B^\033 $BB@O:\033 (B=\033 $B$d$^$@\033 (B^\033 $B$?$m$&\033 (B" , resultStr, delimiters).bad ());
178178 } else {
179- // in case there is no libiconv , report a warning but do not fail
179+ // in case there is no conversion library , report a warning but do not fail
180180 DCMDATA_WARN (" Cannot test DcmSpecificCharacterSet since the underlying character set conversion library is not available" );
181181 }
182182}
@@ -194,8 +194,8 @@ OFTEST(dcmdata_specificCharacterSet_4)
194194 OFCHECK_EQUAL (resultStr, " J\366 rg" );
195195 OFCHECK (converter.convertString (" J\303\251 r\303\264 me" , resultStr).good ());
196196 OFCHECK_EQUAL (resultStr, " J\351 r\364 me" );
197- #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV
198- // (only the ICONV library supports this character set)
197+ #if DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_ICONV || DCMTK_ENABLE_CHARSET_CONVERSION == DCMTK_CHARSET_CONVERSION_OFICONV
198+ // (only the [OF] ICONV library supports this character set)
199199 // the following should fail
200200 OFCHECK (converter.selectCharacterSet (" \\ ISO 2022 IR 87" , " ISO_IR 100" ).good ());
201201 OFCHECK (converter.convertString (" Yamada^Tarou=\033 $B;3ED\033 (B^\033 $BB@O:\033 (B=\033 $B$d$^$@\033 (B^\033 $B$?$m$&\033 (B" , resultStr).bad ());
@@ -223,7 +223,7 @@ OFTEST(dcmdata_specificCharacterSet_4)
223223#endif
224224 }
225225 } else {
226- // in case there is no libiconv , report a warning but do not fail
226+ // in case there is no conversion library , report a warning but do not fail
227227 DCMDATA_WARN (" Cannot test DcmSpecificCharacterSet since the underlying character set conversion library is not available" );
228228 }
229229}
0 commit comments