comparison OrthancServer/FromDcmtkBridge.cpp @ 1093:552a038f7c96

Default encoding is Latin-1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Aug 2014 13:08:41 +0200
parents e494ceb8d763
children ac6bd50a8c83
comparison
equal deleted inserted replaced
1092:88fcf73fbe39 1093:552a038f7c96
118 } 118 }
119 119
120 120
121 Encoding FromDcmtkBridge::DetectEncoding(DcmDataset& dataset) 121 Encoding FromDcmtkBridge::DetectEncoding(DcmDataset& dataset)
122 { 122 {
123 // By default, Ascii encoding is assumed (this removes all the special charaters) 123 // By default, Latin1 encoding is assumed
124 std::string s = Configuration::GetGlobalStringParameter("DefaultEncoding", ""); 124 std::string s = Configuration::GetGlobalStringParameter("DefaultEncoding", "");
125 Encoding encoding = s.empty() ? Encoding_Ascii : StringToEncoding(s.c_str()); 125 Encoding encoding = s.empty() ? Encoding_Latin1 : StringToEncoding(s.c_str());
126 126
127 OFString tmp; 127 OFString tmp;
128 if (dataset.findAndGetOFString(DCM_SpecificCharacterSet, tmp).good()) 128 if (dataset.findAndGetOFString(DCM_SpecificCharacterSet, tmp).good())
129 { 129 {
130 std::string characterSet = Toolbox::StripSpaces(std::string(tmp.c_str())); 130 std::string characterSet = Toolbox::StripSpaces(std::string(tmp.c_str()));