English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.FS-UAE (http://eab.abime.net/forumdisplay.php?f=122)
-   -   FS-UAE does not find files with special characters (http://eab.abime.net/showthread.php?t=104768)

palaste 22 November 2020 15:50

FS-UAE does not find files with special characters
 
I originally wrote an Amiga program called % (yes, a percent mark) in the 1990s when I had a real working Amiga. Now, when I fired up FS-UAE and tried to run the program I was amazed to see that it was not there. The emulated Amiga shell reported that % was an unknown command and it did not show up in the directory listing.
That seemed strange, because it worked all OK on the real Amiga and the file is present in the host Linux system and Linux can find it all OK. Even vamos can run the program by cd:ing to its directory and typing "vamos %".
It turned out FS-UAE was not finding it specifically because it was named %. On the host Linux system, I made a copy of it with a more common name with "cp % percent" and sure enough, percent showed up in FS-UAE and FS-UAE was able to run it.
Is there something that prevents FS-UAE from finding files with special characters?

ztronzo 28 November 2020 08:27

Quote:

Originally Posted by palaste (Post 1442289)
I originally wrote an Amiga program called % (yes, a percent mark) in the 1990s when I had a real working Amiga. Now, when I fired up FS-UAE and tried to run the program I was amazed to see that it was not there. The emulated Amiga shell reported that % was an unknown command and it did not show up in the directory listing.
That seemed strange, because it worked all OK on the real Amiga and the file is present in the host Linux system and Linux can find it all OK. Even vamos can run the program by cd:ing to its directory and typing "vamos %".
It turned out FS-UAE was not finding it specifically because it was named %. On the host Linux system, I made a copy of it with a more common name with "cp % percent" and sure enough, percent showed up in FS-UAE and FS-UAE was able to run it.
Is there something that prevents FS-UAE from finding files with special characters?

Depends on FS-UAE version, OS and the way you mount the hard drive


Sent from my SM-G920W8 using Tapatalk

ztronzo 28 November 2020 08:31

Normally the character "%" should get encoded to "%25" on the PC filesystem.. run rename it from the Amiga end back to "%" and see

Sent from my SM-G920W8 using Tapatalk

palaste 30 November 2020 01:10

I am running FS-UAE version 3.0.5 on a Fedora 32 Linux system. The hard drives are mapped directly to directories on the host Linux system, not using any kind of ADF or HDF files. This way I can access the exact same files on both AmigaOS and Linux.

And because this is Linux and not Windows, the system has no problem with a file literally named %. AmigaOS shouldn't have any problem with it either, and it appeared all OK when I was still using a real Amiga. But for some reason, the emulated AmigaOS under FS-UAE does not see it.

ztronzo 01 December 2020 13:50

Well thats how FS-UAE works.. renames all special characters to % + character code

Did you try renaming it from the amiga end back to "%" it should show up as "%25" on the host folder.
Or rename it from the host to "%25" (without the double quotes) as a workaround.. (Windows also supports % in filenames)

it gets wierder when loading zip or lha archives as harddrives per OS and FS-UAE version.. I have already reported those bugs...

Sent from my SM-G920W8 using Tapatalk

palaste 02 December 2020 02:19

Quote:

Originally Posted by ztronzo (Post 1443855)
Well thats how FS-UAE works.. renames all special characters to % + character code

Did you try renaming it from the amiga end back to "%" it should show up as "%25" on the host folder.
Or rename it from the host to "%25" (without the double quotes) as a workaround.. (Windows also supports % in filenames)

it gets wierder when loading zip or lha archives as harddrives per OS and FS-UAE version.. I have already reported those bugs...

Sent from my SM-G920W8 using Tapatalk

I typed
Code:

copy percent %
on the Amiga emulated by FS-UAE, and sure enough, it created a file called % that I could run all OK. On the host Linux system, the file appeared as %25. Typing
Code:

vamos %25
ran the program all OK directly in the Linux terminal.
I guess what confused me here is that although % is a legal character in file names in both AmigaOS and Linux, it is somehow not mapped directly between the two.

ztronzo 03 December 2020 14:19

Yes indeed, and it can get even wierder.. if you use WinUAE, it uses its own naming method without attaching .uaem files

I should suggest to the developer to use a universal method which both can rely on..

Sent from my SM-G920W8 using Tapatalk

FrodeSolheim 13 January 2021 21:19

Quote:

Originally Posted by palaste (Post 1443935)
I guess what confused me here is that although % is a legal character in file names in both AmigaOS and Linux, it is somehow not mapped directly between the two.

I chose % as an escape character (similar to URL-encoded special characters, and also a slightly unusual character in filenames) to represent characters that cannot be stored in filenames on all supported systems (Windows being the most picky).

So in order to see % from the Amiga side, the host filename must be %25 (25 == hex code for % in ASCII). Of course, files created on the Amiga side will automatically be stored with the correct escaping applied.


All times are GMT +2. The time now is 18:44.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.08386 seconds with 11 queries