Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,23 @@
F url_encode(s)
V r =
V buf =
F flush_buf() // this function is needed because strings in 11l are UTF-16 encoded
I @buf !=
V bytes = @buf.encode(utf-8)
L(b) bytes
@r = %hex(b).zfill(2)
@buf =
L(c) s
I c C (0..9, a..z, A..Z, _, ., -, ~)
flush_buf()
r = c
E
buf = c
flush_buf()
R r
print(url_encode(http://foo bar/))
print(url_encode(https://ru.wikipedia.org/wiki/Транспайлер’))