Page 1 of 1

Zeus can't show file

Posted: Wed Jan 31, 2018 3:18 am
by josen0
Hello,

Zeus can't show the content of a file when I open it from menu left-button mouse, the file appear empty on Zeus IDE and show the message "Error opening the 'C:\User\Jos.." File. The file does not exist or is currently locked. I think that Zeus have some problem with special characters, because in the message the folder name is incorrect, the right name is C:\User\José not C:\User\Jos©.

I use Windows 10, Zeus IDE 3.98l.

I add image from my desktop.

Thank you in advance.

Re: Zeus can't show file

Posted: Wed Jan 31, 2018 4:06 am
by jussij
As you suggest this does look like Zeus is having trouble with the special characters in the file name :(

It looks like the file name is in Unicode.

When you say "from menu left-button mouse" do you mean these steps:
  1. Right click on a line in the active document
  2. Select the File Open option from the pop-up menu
Or did you open the file using these steps:
  1. Right click on a file in the Drives panel on the left
  2. Select the File Open option from the pop-up menu
Also does the file display correctly if you open it using these two options :?:

1. Using the File, Open menu

2. Drag and drop the file from Windows Explorer onto a running version of Zeus

Could you also create a simple test file with that name containing some random text and send that to me as an e-mail attachment :?:

To do this use the contact option found under my user id located at the top left corner of this post.

As a simple test I used the text of the file name in you post to create a test file but for me that test file loaded just fine:
file-open.png
file-open.png (22.67 KiB) Viewed 7199 times
Cheers Jussi

Re: Zeus can't show file

Posted: Wed Jan 31, 2018 11:42 pm
by jussij
I have been able to reproduce this issue and as expected it is caused by creating a file name that contains Unicode characters.

Since Zeus is built as an ANSI executable, that means it calls the ANSI version of Windows GetOpenFileName function (i.e. GetOpenFileNameA and not GetOpenFileNameW) and it is this function that is converting the file name.

This function is converting the that Unicode filename into an 8 bit character string and it is this conversion that is causing the problem as not all the characters can be converted.

You should see a similar issue if opened a command prompt and ran a dir in that folder:
unicode-file.png
unicode-file.png (20.93 KiB) Viewed 7185 times
The only way to fix this would be to change Zeus from being an ANSI executable into being a Unicode executable, however making that change would require some fairly large changes to the Zeus code base, meaning at this time there is no fix for this issue :(

Cheers Jussi

Re: Zeus can't show file

Posted: Thu Feb 01, 2018 1:28 am
by josen0
Hello,

I tried all the forms that you told me and all woks! :D , sorry but I didn't specify the mouse menu, the menu that I refered is the windows system menu that appear when you right-click on a file (I add a image). I think that in this case the issue is related with unicode parameter pass to zeus.exe, I mean:

If you create a file in C:\ with the name "dumpe.c" and another with "dumpé.c" and you try to open the first one with Zeus like this C:\Program Files (x86)\Zeus>zeus C:\dumpe.c you can see that all is ok, but when you try to open the another one with C:\Program Files (x86)\Zeus>zeus C:\dumpé.c you can see that the file is empty and in the lower side appear the message "Error opening the 'C:\dumpé.c' ...".

Thank you in advance for your help, sorry for answer late.

Regards.

P.D. I add the dump.zip file that have dumpé.c, I have to put the file into a zip because the web said "Extension invalid" or something like.

Re: Zeus can't show file

Posted: Thu Feb 01, 2018 11:12 am
by jussij
If you create a file in C:\ with the name "dumpe.c" and another with "dumpé.c"
I am not 100% sure, but I think if you create the dumpé.c file inside Zeus then it should work fine :?:

What I mean by this is doing the following:

1. Start Zeus
2. Zeus File, New menu to create a new file
3. Zeus File, Save As menu and type in Save as dialog name the file: dumpé.c

Cheers Jussi