# HG changeset patch # User Sebastien Jodogne # Date 1561372672 -7200 # Node ID 6cc72ebfd6efdb60e74d499f0d07b9f6754aefc8 # Parent 77702c19a2fad01a424e12d95cd8f439aa474ccb Fix issue #141 (/tools/create-dicom removes non-ASCII characters from study description) diff -r 77702c19a2fa -r 6cc72ebfd6ef NEWS --- a/NEWS Fri Jun 21 18:28:11 2019 +0200 +++ b/NEWS Mon Jun 24 12:37:52 2019 +0200 @@ -30,6 +30,7 @@ * Fix issue #136 (C-FIND request fails when found DICOM file does not have certain tags) * Fix issue #137 (C-STORE fails for unknown SOP Class although server is configured to accept any) * Fix issue #138 (POST to modalities/{name} accepts invalid characters) +* Fix issue #141 (/tools/create-dicom removes non-ASCII characters from study description) Version 1.5.6 (2019-03-01) diff -r 77702c19a2fa -r 6cc72ebfd6ef OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Fri Jun 21 18:28:11 2019 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Mon Jun 24 12:37:52 2019 +0200 @@ -518,11 +518,8 @@ } else if (tag["Type"] == "String") { - std::string value = tag["Value"].asString(); - - bool hasCodeExtensions; - Encoding encoding = dicom.DetectEncoding(hasCodeExtensions); - dicom.ReplacePlainString(*it, Toolbox::ConvertFromUtf8(value, encoding)); + std::string value = tag["Value"].asString(); // This is an UTF-8 value (as it comes from JSON) + dicom.ReplacePlainString(*it, value); } } }