Hello,
As title, I try to read file with Unicode file path on Window OS.
But I fail.
After searching the problem, I find some clues about it and then I fix it.
It seems works fine. But I can't sure there are some details I ignore.
Let me explain how I fix it.
At first DcmInputFileStream use DCMFileProducer to open FILE* pointer by function fopen.
So we can't use wchar_t* to open file.(Unicode path is stored in wchar_t array)
Therefore, I simulate the classes DcmInputFileStream and DCMFileProducer (by c++ inherit class) and try to use OFFile::wfopen in my producer class.
But I have some questions when I simulate those.
I see a class named DCMTempFileStream and DCMTempFileHandler.
But I don't write classes inherit those classes.
Does it cause some error?
Thanks all.
Issue about unicode file path
Moderator: Moderator Team
-
- Posts: 11
- Joined: Tue, 2016-01-05, 15:23
- Location: Taiwan
Issue about unicode file path
Mail : sam24666806@gmail.com
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Issue about unicode file path
If you use the latest DCMTK snapshot and enable DCMTK_WIDE_CHAR_FILE_IO_FUNCTION during configure, you could use wchar_t* wherever an OFFilename parameter is specified.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest