I have download some dicom image with different specific char set.
http://dclunie.com/images/charsettests.20030219.tar.gz
In my code:
Code: Select all
if (dO->search(tag, stack, ESM_fromHere, OFTrue) == EC_Normal)
{
char *szTmp = NULL;
dcmTmp = (DcmElement*) stack.pop();
dcmTmp->getOFStringArray(szTmp);
szTmp = (char *)szTmp.c_str();
}
PS:
When I do nothing with GB18030 (Chinese) and OS is Chinese, it show patient's name correctly.
When I use MultiByteToWideChar with ISO_IR 192(UTF-8) and OS is Chinese, it show patient's name correctly.
Code: Select all
WCHAR* szUnicode;
int i= MultiByteToWideChar( CP_UTF8 , 0 ,(char*) szTmp ,-1 ,NULL,0);
szUnicode = new WCHAR[i];
MultiByteToWideChar ( CP_UTF8 , 0 ,( char * ) szTmp, -1, szUnicode , i);
Do I do nothing with ISO_IR 100, ISO_IR 101, ISO_IR 109, ISO_IR 110, ISO_IR 148, ISO_IR 144, ISO_IR 127, ISO_IR 126, ISO_IR 138 in appropriate OS that show patient's name correctly?
And, How to process Japanese charset?
(sorry, I don't understand clearly at PS 3.5-2004 section 6, and I don't understand what is multivalued mean in 0008,0005)