pep8speaks: Hello @mrbean-bremen! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pydicom/charset.py`](https://github.com/mrbean-bremen/pydicom/blob/511cff9e6493d3533d38a6162fc5d9fe86c13c3e/pydicom/charset.py) !

 - There are no PEP8 issues in the file [`pydicom/tests/test_charset.py`](https://github.com/mrbean-bremen/pydicom/blob/511cff9e6493d3533d38a6162fc5d9fe86c13c3e/pydicom/tests/test_charset.py) !


diff --git a/pydicom/charset.py b/pydicom/charset.py
index 59a0e62ca..120b6f22d 100644
--- a/pydicom/charset.py
+++ b/pydicom/charset.py
@@ -221,9 +221,15 @@ def convert_encodings(encodings):
         patched_encodings = []
         patched = {}
         for x in encodings:
-            if re.match('^ISO[^_]IR', x):
+            # check for spelling errors, but exclude the correct spelling
+            # standard encodings
+            if re.match('^ISO[^_]IR', x) is not None:
                 patched[x] = 'ISO_IR' + x[6:]
                 patched_encodings.append(patched[x])
+            # encodings with code extensions
+            elif re.match('^(?=ISO.2022.IR.)(?!ISO 2022 IR )', x) is not None:
+                patched[x] = 'ISO 2022 IR ' + x[12:]
+                patched_encodings.append(patched[x])
             else:
                 patched_encodings.append(x)
         if patched:

LookupError: unknown encoding: ISO_2022_IR_6
<!-- Instructions For Filing a Bug: https://github.com/pydicom/pydicom/blob/master/CONTRIBUTING.md#filing-bugs -->

#### Description
LookupError: unknown encoding: ISO_2022_IR_6

#### Steps/Code to Reproduce
```
import pydicom
dataset = pydicom.dcmread(filename)
print("Storage type.....:", dataset.SOPClassUID) # runs fine
pat_name = dataset.PatientName # throws error
x = dataset.PatientID # throws error
arr = dataset.pixel_array # runs fine
```
I cannot provide the original data, but pydicom runs fine on most images in my dataset -- it's only a couple images which have this problem. 

#### Expected Results
No error is thrown. 

#### Actual Results
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/afs/cs.stanford.edu/u/emmap1/.local/lib/python3.5/site-packages/pydicom/dataset.py", line 520, in __getattr__
    return self[tag].value
  File "/afs/cs.stanford.edu/u/emmap1/.local/lib/python3.5/site-packages/pydicom/dataset.py", line 599, in __getitem__
    self[tag] = DataElement_from_raw(data_elem, character_set)
  File "/afs/cs.stanford.edu/u/emmap1/.local/lib/python3.5/site-packages/pydicom/dataelem.py", line 493, in DataElement_from_raw
    value = convert_value(VR, raw, encoding)
  File "/afs/cs.stanford.edu/u/emmap1/.local/lib/python3.5/site-packages/pydicom/values.py", line 350, in convert_value
    encoding=encoding[1])
  File "/afs/cs.stanford.edu/u/emmap1/.local/lib/python3.5/site-packages/pydicom/values.py", line 234, in convert_string
    byte_string = byte_string.decode(encoding)
LookupError: unknown encoding: ISO_2022_IR_6
```

#### Versions
Linux-4.4.0-119-generic-x86_64-with-Ubuntu-16.04-xenial
Python 3.5.2
pydicom 1.1.0


diff --git a/pydicom/tests/test_charset.py b/pydicom/tests/test_charset.py
index e6260ef50..1112bf3c8 100644
--- a/pydicom/tests/test_charset.py
+++ b/pydicom/tests/test_charset.py
@@ -150,6 +150,38 @@ class TestCharset(object):
         pydicom.charset.decode(elem, ['utf8'])
         assert u'Buc^Jérôme' == elem.value
 
+    def test_patched_code_extension_charset(self):
+        """Test some commonly misspelled charset values for code extensions."""
+        elem = DataElement(0x00100010, 'PN',
+                           b'Dionysios=\x1b\x2d\x46'
+                           b'\xc4\xe9\xef\xed\xf5\xf3\xe9\xef\xf2')
+        # correct encoding
+        pydicom.charset.decode(elem, ['ISO 2022 IR 100', 'ISO 2022 IR 126'])
+        assert u'Dionysios=Διονυσιος' == elem.value
+
+        # patched encoding shall behave correctly, but a warning is issued
+        with pytest.warns(UserWarning,
+                          match='Incorrect value for Specific Character Set '
+                                "'ISO_2022-IR 100' - assuming "
+                                "'ISO 2022 IR 100'"):
+            elem = DataElement(0x00100010, 'PN',
+                               b'Dionysios=\x1b\x2d\x46'
+                               b'\xc4\xe9\xef\xed\xf5\xf3\xe9\xef\xf2')
+            pydicom.charset.decode(elem,
+                                   ['ISO_2022-IR 100', 'ISO 2022 IR 126'])
+            assert u'Dionysios=Διονυσιος' == elem.value
+
+        with pytest.warns(UserWarning,
+                          match=r'Incorrect value for Specific Character Set '
+                                r"'ISO_2022_IR\+126' - assuming "
+                                r"'ISO 2022 IR 126'"):
+            elem = DataElement(0x00100010, 'PN',
+                               b'Dionysios=\x1b\x2d\x46'
+                               b'\xc4\xe9\xef\xed\xf5\xf3\xe9\xef\xf2')
+            pydicom.charset.decode(elem,
+                                   ['ISO 2022 IR 100', 'ISO_2022_IR+126'])
+            assert u'Dionysios=Διονυσιος' == elem.value
+
     def test_multi_charset_default_value(self):
         """Test that the first value is used if no escape code is given"""
         # regression test for #707

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.6
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
importlib-metadata==4.8.3
iniconfig==1.1.1
packaging==21.3
pluggy==1.0.0
py==1.11.0
-e git+https://github.com/pydicom/pydicom.git@3e67bb6dcf4ed6e0b8eec10fd49f2d37d36cdf3c#egg=pydicom
pyparsing==3.1.4
pytest==7.0.1
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: pydicom
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/pydicom

pydicom/tests/test_charset.py::TestCharset::test_patched_code_extension_charset
pydicom/tests/test_charset.py::TestCharset::test_changed_character_set
pydicom/tests/test_charset.py::TestCharset::test_encodings pydicom/tests/test_charset.py::TestCharset::test_nested_character_sets pydicom/tests/test_charset.py::TestCharset::test_inherited_character_set_in_sequence pydicom/tests/test_charset.py::TestCharset::test_standard_file pydicom/tests/test_charset.py::TestCharset::test_encoding_with_specific_tags pydicom/tests/test_charset.py::TestCharset::test_bad_charset pydicom/tests/test_charset.py::TestCharset::test_patched_charset pydicom/tests/test_charset.py::TestCharset::test_multi_charset_default_value pydicom/tests/test_charset.py::TestCharset::test_single_byte_multi_charset_personname pydicom/tests/test_charset.py::TestCharset::test_single_byte_multi_charset_text pydicom/tests/test_charset.py::TestCharset::test_single_byte_code_extensions[ISO pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrArab-\u0642\u0628\u0627\u0646\u064a^\u0644\u0646\u0632\u0627\u0631] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrFren-Buc^J\xe9r\xf4me] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrFrenMulti-Buc^J\xe9r\xf4me] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrGerm-\xc4neas^R\xfcdiger] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrGreek-\u0394\u03b9\u03bf\u03bd\u03c5\u03c3\u03b9\u03bf\u03c2] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrH31-Yamada^Tarou=\u5c71\u7530^\u592a\u90ce=\u3084\u307e\u3060^\u305f\u308d\u3046] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrH32-\uff94\uff8f\uff80\uff9e^\uff80\uff9b\uff73=\u5c71\u7530^\u592a\u90ce=\u3084\u307e\u3060^\u305f\u308d\u3046] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrHbrw-\u05e9\u05e8\u05d5\u05df^\u05d3\u05d1\u05d5\u05e8\u05d4] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrI2-Hong^Gildong=\u6d2a^\u5409\u6d1e=\ud64d^\uae38\ub3d9] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMulti-\u3084\u307e\u3060^\u305f\u308d\u3046] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMultiExplicitIR6-\u3084\u307e\u3060^\u305f\u308d\u3046] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrKoreanMulti-\uae40\ud76c\uc911] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrRuss-\u041b\u044e\u043ace\u043c\u0431yp\u0433] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrX1-Wang^XiaoDong=\u738b^\u5c0f\u6771] pydicom/tests/test_charset.py::TestCharset::test_charset_patient_names[chrX2-Wang^XiaoDong=\u738b^\u5c0f\u4e1c]
pydicom/charset.py
pydicom/charset.py