Posted to tcl by Poor Yorick at Tue Mar 08 14:31:25 GMT 2022view pretty

package require sqlite3
sqlite3 db
db eval {
	create table t1 (
		c1 text
	)
}
set value %F0%9F%92%99
set valueb [encoding convertto utf-8 $value]
set valuec [binary encode hex $valueb]
puts [list valuec representation [::tcl::unsupported::representation $valuec]]
db eval {
	insert into t1 values ($valuec)
}
puts [list first result [db eval {select typeof(c1) from t1}]]
puts $valuec
puts [list second result [db eval {select typeof(c1) from t1 where c1 = $valuec}]]