Project

General

Profile

$encode » History » Version 20

Per Amundsen, 02/16/2023 09:38 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 19 Per Amundsen
*$encode(text|&binvar, abmuthxr, N)*
4 1 Per Amundsen
5 3 Per Amundsen
Encode text or &binvar using Uuencode, Mime or html codes.
6 1 Per Amundsen
7
If encoding a &binvar, returns the actual number of characters written to the &binvar.
8
9
Default is Uuencode.
10
11 10 Per Amundsen
_See also [[$decode]]._
12
13 1 Per Amundsen
*Parameters*
14
15 20 Per Amundsen
table(ktable).
16
|*Parameter*|*Description*|
17
| text<notextile>|</notextile>&binvar | The text or a &binvar to encode. |
18
| abmuth | a = base32 encoding, b indicates a &binvar is specified, h = html coded encoding, r = url encoding, m = mine encoding, u = Uuencode (default), t = text (default), x = hex encode. *(h,x and r is AdiIRC only)* |
19
| N | If N = 0, number of 60-character chunks, otherwise the Nth 60-character chunk. |
20 6 Per Amundsen
21
*Example*
22
23
<pre>
24
; UUencode 'test'.
25
//echo -ag $encode(test)
26
27
; UUencode 'test', then decode it.
28
//echo -ag $decode($encode(test))
29
</pre>
30 8 Per Amundsen
31 9 Per Amundsen
-------------------------
32 8 Per Amundsen
33
*$encode(%var | &binvar, switches, key, [salt | iv])*
34
35 18 Per Amundsen
*TODO*