Sample code for 30+ languages & platforms
Tcl

Load utf-8 Text File into a StringBuilder

Demonstrates how to load a utf-8 text file into a StringBuilder object instance.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set sb [new_CkStringBuilder]

set success [CkStringBuilder_LoadFile $sb "someFileContainingUtf8.txt" "utf-8"]
if {$success != 1} then {
    puts "Failed."
} else {
    puts "Success."
}


delete_CkStringBuilder $sb