$ xxd <file>
00000000: e288 bc ...
00000000: 7e ~
Hold on... Are we talking about tilde as diacritic? e.g. Ñ ã õ ñ etc unicode chars VS a plain ~ char?
There is no unicode support in winbox's Terminal — so it will not let you enter accented chars. It will store and display them in comments, but you can't enter them from the Terminal window. Only via SSH to router will the option-N + char work, only for comment= lines.
/ip firewall connection print where src-address~":123\$" and so on...
On Mac, if you enable "Show input menu in menu bar" option in System Preferences — in Keyboard section, there is the "Text Input" section, and button for "Edit...". Then in the task bar, another icon will appear where you can select the "Show Keyboard Viewer" & that might let you type the tilde.
of course using 126, i.e. 7E:If you like to use the terminal, you can do this:
printf "\x0c" | pbcopy
This pipes a single formfeed character to the pbcopy, which stores it in the system clipboard. You may then paste it into whatever app you need.
printf "\x7e" | pbcopy
Here we go!!!I don't know, but maybe the issue is between the same character (tilde) across two "standards", it is perfectly possible that you are typing/inserting in other programs the Unicode tilde whilst terminal wlll only accept ASCII (from the little I know of Macintosh they use Unicode).
The ASCII tilde is 0126, it should be obtainable with a combiination of keys, but it depends on the keyboard/language (national) in use, if you have a Swedish keyboard, it should be Alt + ^ :
https://apple.stackexchange.com/questio ... -italian-m
Would this work?
https://apple.stackexchange.com/questio ... ascii-codeof course using 126, i.e. 7E:If you like to use the terminal, you can do this:
printf "\x0c" | pbcopy
This pipes a single formfeed character to the pbcopy, which stores it in the system clipboard. You may then paste it into whatever app you need.
printf "\x7e" | pbcopy
Which one, the printf/pbcopy?Here we go!!!
Thanks a lot. This worked
Whole thing sounds strange. But yeah RouterOS would drop high ASCII chars (unicode) on a paste.Something is wrong in on that macOS if copy from bytes is needed to get plain text character anyway...
echo -n "~" | xxd
True. It's just a key left of the 1. But do know not all keyboards are created equal.For US you have much simpler shortcut, shift+` prints ~
Well...on a US keyboard, Option-N+Space gets you ˜ not the required ~.Well thanks, but Opt+n followed by spacebar is still the standard procedure for producing a plain 'tilde'..
I added the Unicode Hex keyboard to my system. This way I could find - and add - them into the Terminal.Which one, the printf/pbcopy?Here we go!!!
Thanks a lot. This worked
Good though it seems to me overly complex.
It is strange that they haven't a "simple" mode like on Windows (ALT+<dec_ascii_code>), maybe this approach also works:
https://superuser.com/questions/258825/ ... x-terminal
though the key combination needed before typing 0126 (or 007E) seems like variable.
Even in the MikroTik Terminal?On a US Mac keyboard, use Opt+N and then press spacebar to generate "~".
Yep, as said before, it is possible that that "key combo" leads to producing a "different" tilde, not the ASCII one, likely the "small tilde", which is UNicode only.I can write it here ~ but in the Terminal nothing happens with the exact same combo. That is the real issue here.
No, it's 0x7E hex (as on link)1) "real" tilde, Ascii and Unicode 126 or 0x0E: https://www.compart.com/en/unicode/U+007E
on run {input, parameters}
tell application "System Events" to keystroke (ASCII character 126) & " "
return input
end run
on run {input, parameters}
set the clipboard to (ASCII character 126)
tell application "System Events"
keystroke "v" using command down
key code 124
end tell
return input
end run