Mercurial > hg > orthanc
comparison UnitTestsSources/DicomMapTests.cpp @ 3217:cf8cbeb35f33
preliminary support of Korean character set
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 13 Feb 2019 17:46:12 +0100 |
parents | 304184684107 |
children | 109631ed3564 |
comparison
equal
deleted
inserted
replaced
3216:c9a71eb4edcf | 3217:cf8cbeb35f33 |
---|---|
423 { | 423 { |
424 // This is a Latin-1 test string: "crane" with a circumflex accent | 424 // This is a Latin-1 test string: "crane" with a circumflex accent |
425 const unsigned char raw[] = { 0x63, 0x72, 0xe2, 0x6e, 0x65 }; | 425 const unsigned char raw[] = { 0x63, 0x72, 0xe2, 0x6e, 0x65 }; |
426 std::string latin1((char*) &raw[0], sizeof(raw) / sizeof(char)); | 426 std::string latin1((char*) &raw[0], sizeof(raw) / sizeof(char)); |
427 | 427 |
428 std::string utf8 = Toolbox::ConvertToUtf8(latin1, Encoding_Latin1); | 428 std::string utf8 = Toolbox::ConvertToUtf8(latin1, Encoding_Latin1, false); |
429 | 429 |
430 ParsedDicomFile dicom(false); | 430 ParsedDicomFile dicom(false); |
431 dicom.SetEncoding(Encoding_Latin1); | 431 dicom.SetEncoding(Encoding_Latin1); |
432 dicom.ReplacePlainString(DICOM_TAG_PATIENT_NAME, "Hello"); | 432 dicom.ReplacePlainString(DICOM_TAG_PATIENT_NAME, "Hello"); |
433 dicom.ReplacePlainString(DICOM_TAG_STUDY_DESCRIPTION, utf8); | 433 dicom.ReplacePlainString(DICOM_TAG_STUDY_DESCRIPTION, utf8); |