findscu with UTF-8

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ichimura.t
Posts: 5
Joined: Tue, 2015-02-10, 10:02

findscu with UTF-8

#1 Post by ichimura.t »

I want to query by string of UTF-8 using the findscu.exe.
I set PatientName of UTF-8 in -k paramater, but the findscu.exe sends PatientName of S-JIS.

For example of a command:
findscu -S -k 0008,0052=STUDY -k 0008,0005="ISO_IR 192" -k PatientName="あ" 1.2.3.4 12345

The findscu.exe is run by the command prompt with UTF-8 mode.
Is it possible to send message with UTF-8 by findscu?

Michael Onken
DCMTK Developer
Posts: 2052
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: findscu with UTF-8

#2 Post by Michael Onken »

Hi,

findscu does not know anything about character sets at all. It just uses the character codes the console provides from your input and sends them over the wire. So it seems your commandline window is set to S-JIS.

You can switch your console into UTF-8. On Windows, the "chcp" command should do that trick, see e.g. this page for chcp information and example.

Another possibility is to put your query in a little UTF-8-encoded DICOM file and provide that as a parameter to findscu. You could create such a query file from scratch, e.g. by using dump2dcm (use a text editor in UTF-8 mode to edit the tags and then dump to DICOM) and/or dcmodify plus dcmconv (to do the character set conversion).

Best regards,
Michael

ichimura.t
Posts: 5
Joined: Tue, 2015-02-10, 10:02

Re: findscu with UTF-8

#3 Post by ichimura.t »

Thank you for your reply.

I switched my console into UTF-8 by the "chcp 65001" command, but it was not worked.
I will try to do your proposed another possibility.

ichimura.t
Posts: 5
Joined: Tue, 2015-02-10, 10:02

Re: findscu with UTF-8

#4 Post by ichimura.t »

I provided a DICOM file with UTF-8 as a parameter to findscu, and it worked out well.
Thank you very much.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest