comparison OrthancServer/FromDcmtkBridge.cpp @ 1429:7366a0bdda6a

attempt of fix for Syngo.Via
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 Jun 2015 14:43:08 +0200
parents 8e23f16a198d
children f967bdf8534e
comparison
equal deleted inserted replaced
1428:0a355eeeb351 1429:7366a0bdda6a
219 } 219 }
220 220
221 if (element.isaString()) 221 if (element.isaString())
222 { 222 {
223 char *c; 223 char *c;
224 if (element.getString(c).good() && 224 if (element.getString(c).good())
225 c != NULL) 225 {
226 { 226 if (c == NULL) // This case corresponds to the empty string
227 std::string s(c); 227 {
228 std::string utf8 = Toolbox::ConvertToUtf8(s, encoding); 228 return new DicomString("");
229 return new DicomString(utf8); 229 }
230 else
231 {
232 std::string s(c);
233 std::string utf8 = Toolbox::ConvertToUtf8(s, encoding);
234 return new DicomString(utf8);
235 }
230 } 236 }
231 else 237 else
232 { 238 {
233 return new DicomNullValue; 239 return new DicomNullValue;
234 } 240 }