ref: 5262bed1d0a0f153c7c4103d059ac9e7f955bc11
dir: /test/encodechar.myr/
use std
const main = {args : byte[:][:]
chartypes()
}
const chartypes = {
var s
var c
var foo
var buf : byte[32]
s = "1世界äa\n"
while s.len != 0
(c, s) = std.striter(s)
foo = c
if !std.encode(buf[:std.charlen(c)], c)
std.write(1, "couldn't encode\n")
;;
std.write(1, buf[:std.charlen(c)])
;;
}