comparison OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 3441:6cc72ebfd6ef

Fix issue #141 (/tools/create-dicom removes non-ASCII characters from study description)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 24 Jun 2019 12:37:52 +0200
parents cf8cbeb35f33
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3440:77702c19a2fa 3441:6cc72ebfd6ef
516 { 516 {
517 dicom.ReplacePlainString(*it, ""); 517 dicom.ReplacePlainString(*it, "");
518 } 518 }
519 else if (tag["Type"] == "String") 519 else if (tag["Type"] == "String")
520 { 520 {
521 std::string value = tag["Value"].asString(); 521 std::string value = tag["Value"].asString(); // This is an UTF-8 value (as it comes from JSON)
522 522 dicom.ReplacePlainString(*it, value);
523 bool hasCodeExtensions;
524 Encoding encoding = dicom.DetectEncoding(hasCodeExtensions);
525 dicom.ReplacePlainString(*it, Toolbox::ConvertFromUtf8(value, encoding));
526 } 523 }
527 } 524 }
528 } 525 }
529 } 526 }
530 527