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
junk by bcharder
29 days ago
tcl by egavilan
39 days ago
tcl by Stu
41 days ago
tcl by Stu
41 days ago
tcl by oldlaptop
74 days ago
tcl by oldlaptop
74 days ago
tcl by Molnija Bjornsson
79 days ago
tcl by Molnija Bjornsson
79 days ago
tcl by zmoment
79 days ago
tcl by zmoment
79 days ago
Submit
New paste
Documentation
From Jabber