diff --git a/dcmsr/apps/dsr2html.cc b/dcmsr/apps/dsr2html.cc
index 469611ed97..a1b7654122 100644
--- a/dcmsr/apps/dsr2html.cc
+++ b/dcmsr/apps/dsr2html.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2000-2024, OFFIS e.V.
+ * Copyright (C) 2000-2025, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
@@ -207,7 +207,9 @@ int main(int argc, char *argv[])
E_FileReadMode opt_readMode = ERM_autoDetect;
E_TransferSyntax opt_ixfer = EXS_Unknown;
OFBool opt_checkAllStrings = OFFalse;
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
OFBool opt_convertToUTF8 = OFFalse;
+#endif
OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Render DICOM SR file and data set to HTML/XHTML", rcsid);
OFCommandLine cmd;
diff --git a/dcmsr/apps/dsrdump.cc b/dcmsr/apps/dsrdump.cc
index e20368208a..f5b712dc0a 100644
--- a/dcmsr/apps/dsrdump.cc
+++ b/dcmsr/apps/dsrdump.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2000-2023, OFFIS e.V.
+ * Copyright (C) 2000-2025, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
@@ -106,7 +106,9 @@ int main(int argc, char *argv[])
OFBool opt_printFilename = OFFalse;
E_FileReadMode opt_readMode = ERM_autoDetect;
E_TransferSyntax opt_ixfer = EXS_Unknown;
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
OFBool opt_convertToUTF8 = OFFalse;
+#endif
OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Dump DICOM SR file and data set", rcsid);
OFCommandLine cmd;