Zeus can't show file

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
josen0
Posts: 2
Joined: Wed Jan 31, 2018 3:08 am

Zeus can't show file

Post 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.
Attachments
img2.jpg
img2.jpg (127.39 KiB) Viewed 31134 times
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus can't show file

Post 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 31126 times
Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus can't show file

Post 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 31112 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
josen0
Posts: 2
Joined: Wed Jan 31, 2018 3:08 am

Re: Zeus can't show file

Post 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.
Attachments
dump.zip
(287 Bytes) Downloaded 1287 times
img1.jpg
img1.jpg (35.08 KiB) Viewed 31110 times
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus can't show file

Post 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
Post Reply