diff --git a/pydicom/uid.py b/pydicom/uid.py
index 483159e47..741450672 100644
--- a/pydicom/uid.py
+++ b/pydicom/uid.py
@@ -162,15 +162,16 @@ class UID(str):
     @property
     def name(self):
         """Return the UID name from the UID dictionary."""
-        if self in UID_dictionary:
+        uid_string = str.__str__(self)
+        if uid_string in UID_dictionary:
             return UID_dictionary[self][0]
 
-        return str.__str__(self)
+        return uid_string
 
     @property
     def type(self):
         """Return the UID type from the UID dictionary."""
-        if self in UID_dictionary:
+        if str.__str__(self) in UID_dictionary:
             return UID_dictionary[self][1]
 
         return ''
@@ -178,7 +179,7 @@ class UID(str):
     @property
     def info(self):
         """Return the UID info from the UID dictionary."""
-        if self in UID_dictionary:
+        if str.__str__(self) in UID_dictionary:
             return UID_dictionary[self][2]
 
         return ''
@@ -186,7 +187,7 @@ class UID(str):
     @property
     def is_retired(self):
         """Return True if the UID is retired, False otherwise or if private."""
-        if self in UID_dictionary:
+        if str.__str__(self) in UID_dictionary:
             return bool(UID_dictionary[self][3])
 
         return False
diff --git a/pydicom/valuerep.py b/pydicom/valuerep.py
index 3f07ef740..1521c16e1 100644
--- a/pydicom/valuerep.py
+++ b/pydicom/valuerep.py
@@ -517,6 +517,7 @@ def MultiString(val, valtype=str):
 class PersonName3(object):
     def __init__(self, val, encodings=default_encoding):
         if isinstance(val, PersonName3):
+            encodings = val.encodings
             val = val.original_string
 
         self.original_string = val

Encoding type lost with PersonName3
#### Description
Encodings lost when converting DataElements that use PersonName3

#### Steps/Code to Reproduce
```python
from pydicom.charset import decode
from pydicom.dataelem import DataElement

elem = DataElement(0x00100010, 'PN', 'Test')
decode(elem, ['ISO 2022 IR 126'])
assert 'iso_ir_126' in elem.values.encodings
```
#### Actual Results
elem.values.encodings is set to ['iso8859', 'iso8859', 'iso8859'] because `charset.decode` calls
`data_element.value = data_element.value.decode(encodings)`. The `DataElement.value` setter then converts the `PersonName3` object with the correct encodings into a new `PersonName3` object with default encodings.

#### Versions
python 3


diff --git a/pydicom/tests/test_charset.py b/pydicom/tests/test_charset.py
index 7cb62bd75..bb8f838f5 100644
--- a/pydicom/tests/test_charset.py
+++ b/pydicom/tests/test_charset.py
@@ -10,6 +10,7 @@ import pydicom.charset
 from pydicom import dicomio
 from pydicom.data import get_charset_files
 from pydicom.data import get_testdata_files
+from pydicom.dataelem import DataElement
 
 latin1_file = get_charset_files("chrFren.dcm")[0]
 jp_file = get_charset_files("chrH31.dcm")[0]
@@ -85,6 +86,18 @@ class charsetTests(unittest.TestCase):
                     '\033$B$d$^$@\033(B^\033$B$?$m$&\033(B')
         self.assertEqual(expected, ds.PatientName)
 
+    def test_bad_charset(self):
+        """Test bad charset defaults to ISO IR 6"""
+        # Python 3: elem.value is PersonName3, Python 2: elem.value is str
+        elem = DataElement(0x00100010, 'PN', 'CITIZEN')
+        pydicom.charset.decode(elem, ['ISO 2022 IR 126'])
+        # After decode Python 2: elem.value is PersonNameUnicode
+        assert 'iso_ir_126' in elem.value.encodings
+        assert 'iso8859' not in elem.value.encodings
+        # default encoding is iso8859
+        pydicom.charset.decode(elem, [])
+        assert 'iso8859' in elem.value.encodings
+
 
 if __name__ == "__main__":
     # This is called if run alone, but not if loaded through run_tests.py
diff --git a/pydicom/tests/test_uid.py b/pydicom/tests/test_uid.py
index f035c4cdd..2d7938b89 100644
--- a/pydicom/tests/test_uid.py
+++ b/pydicom/tests/test_uid.py
@@ -3,7 +3,7 @@
 
 import pytest
 
-from pydicom.uid import UID, generate_uid, PYDICOM_ROOT_UID
+from pydicom.uid import UID, generate_uid, PYDICOM_ROOT_UID, JPEGLSLossy
 
 
 class TestGenerateUID(object):
@@ -61,7 +61,6 @@ class TestUID(object):
         assert not self.uid == 'Explicit VR Little Endian'
         # Issue 96
         assert not self.uid == 3
-        assert not self.uid is None
 
     def test_inequality(self):
         """Test that UID.__ne__ works."""
@@ -73,7 +72,6 @@ class TestUID(object):
         assert self.uid != 'Explicit VR Little Endian'
         # Issue 96
         assert self.uid != 3
-        assert self.uid is not None
 
     def test_hash(self):
         """Test that UID.__hash_- works."""
@@ -183,6 +181,21 @@ class TestUID(object):
         assert self.uid.name == 'Implicit VR Little Endian'
         assert UID('1.2.840.10008.5.1.4.1.1.2').name == 'CT Image Storage'
 
+    def test_name_with_equal_hash(self):
+        """Test that UID name works for UID with same hash as predefined UID.
+        """
+        class MockedUID(UID):
+            # Force the UID to return the same hash as one of the
+            # uid dictionary entries (any will work).
+            # The resulting hash collision forces the usage of the `eq`
+            # operator while checking for containment in the uid dictionary
+            # (regression test for issue #499)
+            def __hash__(self):
+                return hash(JPEGLSLossy)
+
+        uid = MockedUID('1.2.3')
+        assert uid.name == '1.2.3'
+
     def test_type(self):
         """Test that UID.type works."""
         assert self.uid.type == 'Transfer Syntax'
diff --git a/pydicom/tests/test_valuerep.py b/pydicom/tests/test_valuerep.py
index cd4e0a7fb..49ff72625 100644
--- a/pydicom/tests/test_valuerep.py
+++ b/pydicom/tests/test_valuerep.py
@@ -310,6 +310,15 @@ class PersonNametests(unittest.TestCase):
         msg = "PersonName3 not equal comparison did not work correctly"
         self.assertFalse(pn != "John^Doe", msg)
 
+    def test_encoding_carried(self):
+        """Test encoding is carried over to a new PN3 object"""
+        # Issue 466
+        from pydicom.valuerep import PersonName3
+        pn = PersonName3("John^Doe", encodings='iso_ir_126')
+        assert pn.encodings == ['iso_ir_126', 'iso_ir_126', 'iso_ir_126']
+        pn2 = PersonName3(pn)
+        assert pn2.encodings == ['iso_ir_126', 'iso_ir_126', 'iso_ir_126']
+
 
 class DateTimeTests(unittest.TestCase):
     """Unit tests for DA, DT, TM conversion to datetime objects"""

pip install -e .[dev]
parse_log_pytest
pytest
pytest pytest-cov
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
coverage==6.2
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
-e git+https://github.com/pydicom/pydicom.git@7783dce0013448e9c1acdb1b06e4ffbe97c3d334#egg=pydicom
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-cov==4.0.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

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
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_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
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - 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
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==6.2
      - pytest-cov==4.0.0
      - tomli==1.2.3
prefix: /opt/conda/envs/pydicom

pydicom/tests/test_charset.py::charsetTests::test_bad_charset pydicom/tests/test_uid.py::TestUID::test_name_with_equal_hash pydicom/tests/test_valuerep.py::PersonNametests::test_encoding_carried
pydicom/tests/test_charset.py::charsetTests::testEncodingWithSpecificTags pydicom/tests/test_charset.py::charsetTests::testEncodings pydicom/tests/test_charset.py::charsetTests::testExplicitISO2022_IR6 pydicom/tests/test_charset.py::charsetTests::testLatin1 pydicom/tests/test_charset.py::charsetTests::testMultiPN pydicom/tests/test_charset.py::charsetTests::testNestedCharacterSets pydicom/tests/test_charset.py::charsetTests::testStandardFile pydicom/tests/test_uid.py::TestGenerateUID::test_generate_uid pydicom/tests/test_uid.py::TestUID::test_equality pydicom/tests/test_uid.py::TestUID::test_inequality pydicom/tests/test_uid.py::TestUID::test_hash pydicom/tests/test_uid.py::TestUID::test_str pydicom/tests/test_uid.py::TestUID::test_is_implicit_vr pydicom/tests/test_uid.py::TestUID::test_is_little_endian pydicom/tests/test_uid.py::TestUID::test_is_deflated pydicom/tests/test_uid.py::TestUID::test_is_transfer_syntax pydicom/tests/test_uid.py::TestUID::test_is_compressed pydicom/tests/test_uid.py::TestUID::test_is_encapsulated pydicom/tests/test_uid.py::TestUID::test_name pydicom/tests/test_uid.py::TestUID::test_type pydicom/tests/test_uid.py::TestUID::test_info pydicom/tests/test_uid.py::TestUID::test_is_retired pydicom/tests/test_uid.py::TestUID::test_is_valid pydicom/tests/test_uid.py::TestUID::test_is_private pydicom/tests/test_uid.py::TestUIDPrivate::test_equality pydicom/tests/test_uid.py::TestUIDPrivate::test_inequality pydicom/tests/test_uid.py::TestUIDPrivate::test_hash pydicom/tests/test_uid.py::TestUIDPrivate::test_str pydicom/tests/test_uid.py::TestUIDPrivate::test_is_implicit_vr pydicom/tests/test_uid.py::TestUIDPrivate::test_is_little_endian pydicom/tests/test_uid.py::TestUIDPrivate::test_is_deflated pydicom/tests/test_uid.py::TestUIDPrivate::test_is_transfer_syntax pydicom/tests/test_uid.py::TestUIDPrivate::test_is_compressed pydicom/tests/test_uid.py::TestUIDPrivate::test_is_encapsulated pydicom/tests/test_uid.py::TestUIDPrivate::test_name pydicom/tests/test_uid.py::TestUIDPrivate::test_type pydicom/tests/test_uid.py::TestUIDPrivate::test_info pydicom/tests/test_uid.py::TestUIDPrivate::test_is_retired pydicom/tests/test_uid.py::TestUIDPrivate::test_is_valid pydicom/tests/test_uid.py::TestUIDPrivate::test_is_private pydicom/tests/test_valuerep.py::TMPickleTest::testPickling pydicom/tests/test_valuerep.py::DTPickleTest::testPickling pydicom/tests/test_valuerep.py::DAPickleTest::testPickling pydicom/tests/test_valuerep.py::DSfloatPickleTest::testPickling pydicom/tests/test_valuerep.py::DSdecimalPickleTest::testPickling pydicom/tests/test_valuerep.py::ISPickleTest::testPickling pydicom/tests/test_valuerep.py::BadValueReadtests::testReadBadValueInVRDefault pydicom/tests/test_valuerep.py::BadValueReadtests::testReadBadValueInVREnforceValidValue pydicom/tests/test_valuerep.py::DecimalStringtests::testInvalidDecimalStrings pydicom/tests/test_valuerep.py::DecimalStringtests::testValidDecimalStrings pydicom/tests/test_valuerep.py::PersonNametests::testCopy pydicom/tests/test_valuerep.py::PersonNametests::testFormatting pydicom/tests/test_valuerep.py::PersonNametests::testLastFirst pydicom/tests/test_valuerep.py::PersonNametests::testNotEqual pydicom/tests/test_valuerep.py::PersonNametests::testThreeComponent pydicom/tests/test_valuerep.py::PersonNametests::testUnicodeJp pydicom/tests/test_valuerep.py::PersonNametests::testUnicodeKr pydicom/tests/test_valuerep.py::DateTimeTests::testDate pydicom/tests/test_valuerep.py::DateTimeTests::testDateTime pydicom/tests/test_valuerep.py::DateTimeTests::testTime
pydicom/uid.py pydicom/valuerep.py
pydicom/uid.py pydicom/valuerep.py