|
1 | 1 | /* |
2 | 2 | * |
3 | | - * Copyright (C) 2011-2017, OFFIS e.V. |
| 3 | + * Copyright (C) 2011-2025, OFFIS e.V. |
4 | 4 | * All rights reserved. See COPYRIGHT file for details. |
5 | 5 | * |
6 | 6 | * This software and supporting documentation were developed by |
@@ -36,7 +36,7 @@ class DcmItem; |
36 | 36 |
|
37 | 37 | /** A class for managing and converting between different DICOM character sets. |
38 | 38 | * The conversion relies on the OFCharacterEncoding class, which again relies |
39 | | - * on an underlying character encoding library (e.g. libiconv or ICU). |
| 39 | + * on an underlying character encoding library (e.g. oficonv or libiconv). |
40 | 40 | * @note Please note that a current limitation is that only a single value is |
41 | 41 | * allowed for the destination character set (i.e. no code extensions). Of |
42 | 42 | * course, for the source character set, also multiple values are supported. |
@@ -254,6 +254,37 @@ class DCMTK_DCMDATA_EXPORT DcmSpecificCharacterSet |
254 | 254 | */ |
255 | 255 | OFCondition selectCharacterSetWithCodeExtensions(const unsigned long sourceVM); |
256 | 256 |
|
| 257 | + /** convert the given string from the selected source character set (without |
| 258 | + * code extensions) to the selected destination character set |
| 259 | + * @param fromString input string to be converted |
| 260 | + * @param fromLength length of the input string (in bytes) |
| 261 | + * @param toString reference to variable where to store the converted |
| 262 | + * string |
| 263 | + * @param delimiters string of characters regarded as delimiters |
| 264 | + * @return status, EC_Normal if successful, an error code otherwise |
| 265 | + */ |
| 266 | + OFCondition convertStringWithoutCodeExtensions(const char *fromString, |
| 267 | + const size_t fromLength, |
| 268 | + OFString &toString, |
| 269 | + const OFString &delimiters); |
| 270 | + |
| 271 | + /** convert the given string from the selected source character set(s) to |
| 272 | + * the selected destination character set. This method supports code |
| 273 | + * extension techniques according to ISO 2022 for the input string. |
| 274 | + * @param fromString input string to be converted |
| 275 | + * @param fromLength length of the input string (in bytes) |
| 276 | + * @param toString reference to variable where to store the |
| 277 | + * converted string |
| 278 | + * @param delimiters string of characters regarded as delimiters |
| 279 | + * @param hasEscapeChar flag indicating wether the input string contains |
| 280 | + * one or more escape characters (ESC) |
| 281 | + * @return status, EC_Normal if successful, an error code otherwise |
| 282 | + */ |
| 283 | + OFCondition convertStringWithCodeExtensions(const char *fromString, |
| 284 | + const size_t fromLength, |
| 285 | + OFString &toString, |
| 286 | + const OFString &delimiters, |
| 287 | + const OFBool hasEscapeChar); |
257 | 288 |
|
258 | 289 | /** check whether the given string contains at least one escape character |
259 | 290 | * (ESC), because it is used for code extension techniques like ISO 2022 |
|
0 commit comments