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

  1. package require sqlite3
  2. sqlite3 db
  3. db eval {
  4. create table t1 (
  5. c1 text
  6. )
  7. }
  8. set value %F0%9F%92%99
  9. set valueb [encoding convertto utf-8 $value]
  10. set valuec [binary encode hex $valueb]
  11. puts [list valuec representation [::tcl::unsupported::representation $valuec]]
  12. db eval {
  13. insert into t1 values ($valuec)
  14. }
  15. puts [list first result [db eval {select typeof(c1) from t1}]]
  16. puts $valuec
  17. puts [list second result [db eval {select typeof(c1) from t1 where c1 = $valuec}]]
  18.