diff Resources/EncodingTests.py @ 1347:60cc0ee61edb

author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 Apr 2015 17:43:05 +0200
parents a66224eec125
children 423d3b692bb9
line wrap: on
line diff
--- a/Resources/EncodingTests.py	Mon Apr 20 17:26:02 2015 +0200
+++ b/Resources/EncodingTests.py	Tue Apr 21 17:43:05 2015 +0200
@@ -12,6 +12,7 @@
     'ISO-8859-4' : 'Latin4',
     'ISO-8859-9' : 'Latin5',
     'ISO-8859-5' : 'Cyrillic',
+    'WINDOWS-1251' : 'Windows1251',
     'ISO-8859-6' : 'Arabic',
     'ISO-8859-7' : 'Greek',
     'ISO-8859-8' : 'Hebrew',
@@ -49,6 +50,18 @@
 expected.append(ToArray('Þßàáâã'))
 encoded.append('"\\x81\\x30\\x89\\x37\\x81\\x30\\x89\\x38\\xA8\\xA4\\xA8\\xA2\\x81\\x30\\x89\\x39\\x81\\x30\\x8A\\x30"')
 
+# Issue 32
+# "encoded" is the copy/paste from "dcm2xml +Ca cyrillic Issue32.dcm"
+l.append('::Orthanc::Encoding_Windows1251')
+encoded.append('"\\xd0\\xe5\\xed\\xf2\\xe3\\xe5\\xed\\xee\\xe3\\xf0\\xe0\\xf4\\xe8\\xff"')
+expected.append(ToArray('Рентгенография'))
+l.append('::Orthanc::Encoding_Windows1251')
+encoded.append('"\\xD2\\xE0\\xE7"')
+expected.append(ToArray('Таз'))
+l.append('::Orthanc::Encoding_Windows1251')
+encoded.append('"\\xcf\\xf0\\xff\\xec\\xe0\\xff"')
+expected.append(ToArray('Прямая'))
+
 
 if True:
     print 'static const unsigned int testEncodingsCount = %d;' % len(l)