Function of transferring the script over SSH

Exactly!


Oh… just read the code:
define 2 arrays of same number of items,
on the 1st “ascii”, all possible RouterOS 7-bit ascii + 8th bit (no matter of the codepage, but is CP437)
on the 2nd “ASCIItoESCAPE”, all corresponding escape symbol or same letter / number / character if are equal, like numbers, letter parenthesys, etc.
no matter if the escaped value are more than one character, what count is array position. (for example, also on URL encode space is +, the same size, but ? is %3F, 3 charactes)
at that point read the input string, one character at time
based on character position on “array”, add the same position content on “ASCIItoESCAPE” on the output string.
Done…


For the “escape” function is based on how I already have wroted for convert ASCII 8-bit CP1252 (1 character) to UTF-8 that often are more than 2 characters for each converted ASCII character
http://forum.mikrotik.com/t/rextended-fragments-of-snippets/151033/1
For the function “sendscript2ssh” is a litte mod of the already done function “scr2sshcmd” for send a function over SSH
http://forum.mikrotik.com/t/send-sms-from-different-router/148712/85


Exactly, all 256 possible values of 8-bit characters, from 0x00 to 0xFF, are covered.