- Status Closed
- Percent Complete
- Task Type Bug Report
- Category QCAD (main)
-
Assigned To
Andrew - Operating System Windows (All)
- Severity Critical
- Priority Very Low
- Reported Version n/a
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Ubirajara Bandeira Jr - 27.06.2018
Last edited by Andrew - 27.06.2018
FS#1771 - Open file bug: QCAD fails to open a file with space or special characters in its name or in its path
Description:
QCAD fails to open a file with space or special characters in its name or in its path.
Special characters are “á”, “ç”, “Ê”, “ß”, “+” etc.
Steps to reproduce:
1. Open a file named with spaces or with special characters or a file inside a folder that is named with spaces or with special characters.
What happens
- Warning about import error and file is not opened
What would be the correct behavior
- The file would be opened
I have used QCAD for a long time waiting for developers to correct that issue, that happened with all versions QCAD I used.
It was a trivial behavior for programs in Windows to manipulate files and folders with spaces and special characters. That issue is like the conversion method is too old, like from MSDOS 8.3 limitations.
The people that just want to open a DXF file to work face with that issue and thinks “that QCAD does not open DXF files”, and give up using that software. I gave up in the past because that. I discovered that QCAD works fine with MSDOS 8.3 format, and I created a script to rename files and folders before opening them, but it is not for everyone.
As QCAD works well with open DXF format, I think it is a important software to eliminate DWG dependency. Also, I think it would be very simple to solve that in code and very important to correct it.
I do not know if DWG trial plugin avoid that issue.
Only the community edition (dxflib) is affected.
Well, I think that StackOverflow answers solve that issue:
https://stackoverflow.com/questions/396567/is-there-a-standard-way-to-do-an-fopen-with-a-unicode-string-file-path
https://stackoverflow.com/questions/402283/stdwstring-vs-stdstring
It is like doing a #ifndef to detect with SO is running on compiler to choose if it will use fopen or _wfopen and string or wstring.