Sample code for 30+ languages & platforms
DataFlex

Load utf-8 Text File into a StringBuilder

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

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoSb

    Move False To iSuccess

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSb
    If (Not(IsComObjectCreated(hoSb))) Begin
        Send CreateComObject of hoSb
    End

    Get ComLoadFile Of hoSb "someFileContainingUtf8.txt" "utf-8" To iSuccess
    If (iSuccess <> True) Begin
        Showln "Failed."
    End
    Else Begin
        Showln "Success."
    End



End_Procedure