packed UTF 9 by yt

with text_io;use text_io;procedure a is
s:string:=get_line;type b is mod 256;u:array(1..s'last/3)of b;type n is array(1..u'size/9)of
character;for n'component_size use 9;m:n;for m'address use u'address;begin
for i in u'range loop
u(i):=b'value("16#"&s(i*3-2..i*3-1)&"#");end loop;put(string(m));end;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page