Have you tried the %Stream.FileCharacter class? For example, the following should create a  file that contains "Hello Lambda!" but with the unicode character for lambda:

ClassMethod WriteUTF8()
{
    Set stream=##class(%Stream.FileCharacter).%New()
    Set sc=stream.LinkToFile("c:\tmp\lambda.txt")
    Do stream.TranslateTableSet("UTF8")
    Do stream.Write("Hello " _ $CHAR(955) _ "!")
    Do stream.%Save()
}

Though I am not sure how you can create unicode characters in an 8 bit cache installation.

I am having trouble understanding this example in terms of the documentation for open:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

What does the "QR" mean here? According to the docbook, the second argument to open should be in parenthesis, why that not necessary here?

Answer:

Both the "QR" and "|PIPES|" string are documented here:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...