Mercurial > hg > orthanc-tests
changeset 314:59e8a50bef00
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 26 May 2020 11:23:14 +0200 |
parents | 857016edb861 |
children | 0124075797cd |
files | Plugins/DicomWeb/Run.py Tests/Tests.py |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/DicomWeb/Run.py Fri May 22 14:42:36 2020 +0200 +++ b/Plugins/DicomWeb/Run.py Tue May 26 11:23:14 2020 +0200 @@ -541,6 +541,9 @@ # Wrong serialization of PN VR # https://bitbucket.org/sjodogne/orthanc/issues/113 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/2/ + + # Make sure UTF-8 encoding is used + self.assertEqual('Utf8', DoPut(ORTHANC, '/tools/default-encoding', 'Utf8')) UploadInstance(ORTHANC, 'Encodings/DavidClunie/SCSX1') study = '1.3.6.1.4.1.5962.1.2.0.1175775771.5711.0' @@ -803,6 +806,9 @@ self.assertEqual(3, len(qido[0]['00100010']['Value'][0])) return qido[0]['00100010']['Value'][0] + # Make sure UTF-8 encoding is used + self.assertEqual('Utf8', DoPut(ORTHANC, '/tools/default-encoding', 'Utf8')) + # Check out "test_issue_95_encodings" in "../../Tests/Tests.py" self.assertEqual(u'Buc^Jérôme', GetPatientName('Encodings/DavidClunie/SCSFREN', True) ['Alphabetic'])
--- a/Tests/Tests.py Fri May 22 14:42:36 2020 +0200 +++ b/Tests/Tests.py Tue May 26 11:23:14 2020 +0200 @@ -2372,6 +2372,9 @@ tags = DoGet(_REMOTE, '/instances/%s/tags?simplify' % f) self.assertNotEqual(u'Рентгенография', tags['SeriesDescription']) + # Back to UTF-8 + self.assertEqual('Utf8', DoPut(_REMOTE, '/tools/default-encoding', 'Utf8')) + def test_encodings(self): # Latin-1 (ISO_IR 100) @@ -3362,6 +3365,9 @@ tmp = ENCODINGS[name][1] self.assertEqual(TEST.encode(tmp, 'ignore').decode(tmp), a[0]["PatientMainDicomTags"]["PatientName"]) + # Back to UTF-8 + self.assertEqual('Utf8', DoPut(_REMOTE, '/tools/default-encoding', 'Utf8')) + def test_reconstruct(self): def CompareMainDicomTag(expected, instance, level, tag):