Encoding

From Lundman Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To deal with non-printable characters, and other locale encoding schemes possible, FXP.One will encode all file-system paths, and human readable strings. The following commands, messages and items are encoded:

LOG|MSG=       - All MSG= are encoded (That come from remote FTP)
CMD|MSG=       - When issuing a command, like that of "SITE", MSG are encoded.
Filenames      - Like that of SRCNAME, DSTNAME and DIRLIST reply.
Directory names- Like that of SRCDIR, DSTDIR, SRCPATH, DSTPATH, DIRLIST, CWD, MKD, RMD and PWD replies.


Affected commands are:

                DIRLIST(SRCNAME, DSTNAME, SRCDIR, DSTDIR, SRCPATH, DSTPATH, NAME)
                QUOTE(MSG)
                CWD(PATH)
                PWD(PATH)
                SIZE(PATH)
                QADD(SRCNAME,SRCDIR,SRCPATH,DSTNAME,DSTDIR,DSTPATH)
                DELE(PATH)
                MKD(PATH)
                RMD(PATH)
                SITE(CMD,MSG)
                REN(FROM,TO)
                MTDM(PATH)
                QGET(SRCPATH,DSTPATH)
                QERR(SRCPATH,DSTPATH)
                QS(SRCPATH,DSTPATH,SRCDIR,DSTDIR,MKD)
                QC(SRCPATH,DSTPATH)     


NOTE:

Instead of inventing yet another encoding scheme, I have gone for an existing encoding standard. Namely that of URL encoding. However, it is in the QUERY STRING syntax. This means, space (' ') is replace by plus ('+'). That means plus ('+') is encoded as "%2B".

The other valid characters are:

"A-Za-z0-9$-_.!*\(),/"  ==>  These are left as-is. Excluding ""
           " "          ==>   "+"
           All others   ==>   encoded as %xx