$encode » History » Version 21
Per Amundsen, 09/10/2023 02:38 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | 21 | Per Amundsen | *$encode(text|&binvar, abmuthxrBRO, 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 | 21 | Per Amundsen | | abmuthBRO | 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, B = binary, R = rot13, O = octal. *(h,x,r,B,R,O is AdiIRC only)* | |
19 | 20 | Per Amundsen | | 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* |