Posted to tcl by kostix at Mon Jan 24 22:20:17 GMT 2011view raw

  1. % set s {тестирование}
  2. тестирование
  3. % set b [encoding convertto utf-8 $s]
  4. тестирование
  5. % string length $s
  6. 12
  7. % string length $b
  8. 24
  9. % set x [string index $b 10]
  10. Ñ
  11. % scan $x %c
  12. 209
  13.