Sample code for 30+ languages & platforms
PowerBuilder

Load utf-8 Text File into a StringBuilder

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

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Sb

li_Success = 0

loo_Sb = create oleobject
li_rc = loo_Sb.ConnectToNewObject("Chilkat.StringBuilder")
if li_rc < 0 then
    destroy loo_Sb
    MessageBox("Error","Connecting to COM object failed")
    return
end if

li_Success = loo_Sb.LoadFile("someFileContainingUtf8.txt","utf-8")
if li_Success <> 1 then
    Write-Debug "Failed."
else
    Write-Debug "Success."
end if



destroy loo_Sb