comparison Core/DicomParsing/FromDcmtkBridge.cpp @ 3448:b3bdd6dc10f2

don't change encoding of SpecificCharacterSet
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Jun 2019 14:18:46 +0200
parents 8ed445e94486
children 33cfcc74d1b1
comparison
equal deleted inserted replaced
3447:d30668b1a44a 3448:b3bdd6dc10f2
2310 { 2310 {
2311 std::string utf8; 2311 std::string utf8;
2312 2312
2313 if (c != NULL) // This case corresponds to the empty string 2313 if (c != NULL) // This case corresponds to the empty string
2314 { 2314 {
2315 std::string s(c); 2315 if (element.getTag() == DCM_SpecificCharacterSet)
2316 utf8 = Toolbox::ConvertToUtf8(s, encoding, hasCodeExtensions); 2316 {
2317 utf8.assign(c);
2318 }
2319 else
2320 {
2321 std::string s(c);
2322 utf8 = Toolbox::ConvertToUtf8(s, encoding, hasCodeExtensions);
2323 }
2317 } 2324 }
2318 2325
2319 std::string newValue; 2326 std::string newValue;
2320 ITagVisitor::Action action = visitor.VisitString 2327 ITagVisitor::Action action = visitor.VisitString
2321 (newValue, parentTags, parentIndexes, tag, vr, utf8); 2328 (newValue, parentTags, parentIndexes, tag, vr, utf8);