R, 6363 59 bytes
function(s)forwrite(x in rep(utf8ToInt(s),e=5)cat(x%%/%3^(4:0)%%3,' '1,sep='',,"")
Nothing cleverNothing clever, but a straightforward implementation in R is shorter than anything else that I can think of so far...
To avoid the penalty of defining a base-conversion function
to use on each character, butwe repeat each character value 5 times, and then use vectorized integer division (%/%
) and modulo (%%
) to calculate all the base-3 digits. Then, by lucky co-incidence, the write
function splits its output data into a straightforward implementation in R is shorter than anything else that I can thinkcolumn width of so far..5 by default.