I have an oorexx script that receives text strings (json strings) encoded in utf8 (peppered with german diacritics) and would like to convert the strings into ansi format.

I discovered the sysFromUnicode and sysToUnicode functions in the oorexx 4.1.1 manual but could to get any meaningful results.

here is what I tried:
1) store the text "Tr" in a utf8.txt file in utf8 format
2) and read it back in with rexx in a variable str.
fs = .Stream~new('utf8.txt')
str = fs~linein
fs~close
say str
say 'rc = 'sysFromUnicode(str, , , , 'outStem.')
loop ix over outStem.
say 'outstem.'ix' = <'outstem.ix'>'
end

outputs:
Tür
rc = 0
outstem.!TEXT = <??>
outstem.!USEDDEFAULTCHAR = <1>

Can someone help me out here?
Madou