char -> unicode .. is there a prettier way?
Posted to
tcl
by aspect at Sat Apr 26 09:12:37 GMT 2014
view raw
proc
unicode {s} {
join
[lmap c [
split
$s
""] {
scan
$c
%c x
if
{
$x
< 1<<16} {
format
\\u%04x
$x
}
else
{
format
\\U%08x
$x
}
}] ""
}
Recent Posts
tcl by schelte
9 days ago
tcl by emiliano
16 days ago
tcl by fvogel
16 days ago
tcl by emiliano
16 days ago
tcl by rmax
33 days ago
tcl by oldlaptop
33 days ago
tcl by schelte
34 days ago
tcl by Bradipo
46 days ago
tcl by kbk
56 days ago
tcl by oldlaptop
59 days ago
Submit
New paste
Documentation
From Jabber