I just checked OOME 4, and I think that I have a glaring omission in that I do not test or document the behavior of using write or print with special characters. Sadly, I do not know the answer off hand, but, I expect that you are seeing that they are not properly supported.
Can you try using Simple File Access instead and let me know if that works?
There is an example her:
http://www.pitonyak.org/oo.php
http://www.pitonyak.org/OOME_4_0.odt
I include the example here, but, you should be able to see what you need to do. Also note that the ODT documents contains the macros and you can run the test program while reading the document if you eneable macros when you load the document.
This is the example macro:
Sub ExampleSimpleFileAccess
Dim oSFA ' SimpleFileAccess service.
Dim sFileName$ ' Name of file to open.
Dim oStream ' Stream returned from SimpleFileAccess.
Dim oTextStream ' TextStream service.
Dim sStrings ' Strings to test write / read.
Dim sInput$ ' The string that is read.
Dim s$ ' Accumulate result to print.
Dim i% ' Index variable.
sStrings = Array("One", "UTF:Āā", "1@3")
' File to use.
sFileName = CurDir() & "/delme.out"
' Create the SimpleFileAccess service.
oSFA = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
'Create the Specialized stream.
oTextStream = CreateUnoService("com.sun.star.io.TextOutputStream")
'If the file already exists, delete it.
If oSFA.exists(sFileName) Then
oSFA.kill(sFileName)
End If
' Open the file for writing.
oStream = oSFA.openFileWrite(sFileName)
' Attach the simple stream to the text stream.
' The text stream will use the simple stream.
oTextStream.setOutputStream(oStream)
' Write the strings.
For i = LBound(sStrings) To UBound(sStrings)
oTextStream.writeString(sStrings(i) & CHR$(10))
Next
' Close the stream.
oTextStream.closeOutput()
oTextStream = CreateUnoService("com.sun.star.io.TextInputStream")
oStream = oSFA.openFileRead(sFileName)
oTextStream.setInputStream(oStream)
For i = LBound(sStrings) To UBound(sStrings)
sInput = oTextStream.readLine()
s = s & CStr(i)
' If the EOF is reached then the new line delimiters are
' not removed. I consider this a bug.
If oTextStream.isEOF() Then
If Right(sInput, 1) = CHR$(10) Then
sInput = Left(sInput, Len(sInput) - 1)
End If
End If
' Verify that the read string is the same as the written string.
If sInput <> sStrings(i) Then
s = s & " : BAD "
Else
s = s & " : OK "
End If
s = s & "(" & sStrings(i) & ")"
s = s & "(" & sInput & ")" & CHR$(10)
Next
oTextStream.closeInput()
MsgBox s
End Sub
Let me know if this works, I believe that it will. I hope that it will.