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
21 days ago
tcl by egavilan
30 days ago
tcl by Stu
32 days ago
tcl by Stu
32 days ago
tcl by oldlaptop
65 days ago
tcl by oldlaptop
65 days ago
tcl by Molnija Bjornsson
70 days ago
tcl by Molnija Bjornsson
70 days ago
tcl by zmoment
70 days ago
tcl by zmoment
70 days ago
Submit
New paste
Documentation
From Jabber