Encoding: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
To deal with non-printable characters, and other locale encoding | 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: | ||
schemes possible, FXP.One will encode all file-system paths, and human | |||
readable strings. The following commands, messages and items are | LOG|MSG= - All MSG= are encoded (That come from remote FTP) | ||
encoded | 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: | Affected commands are: | ||
Line 39: | Line 36: | ||
The other valid characters are: | The other valid characters are: | ||
"A-Za-z0-9$-_.!*\(),/" ==> These are left as-is. Excluding "" | "A-Za-z0-9$-_.!*\(),/" ==> These are left as-is. Excluding "" | ||
" " ==> "+" | " " ==> "+" | ||
All others ==> encoded as %xx | All others ==> encoded as %xx |
Revision as of 08:06, 14 October 2005
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