I have an issue when reading RTL strings from Db2 for IBM i using C#. I tried enabling the bi-directional strings on IBM i Client Access and have the same issue as here.
I am using IIS 10.
So they seem to have written a function that fixes the strings; but I am having trouble because the strings have mixed Hebrew and English, and the words are not in the right order as well.
I tried reversing the whole string and then re-reversing the Latin and numeric characters, and sometimes the final letter still wraps around to the start. I'll keep trying to get it right but hopefully the algorithm to fix this is already out there... I can't find it.
What I did find is that when setting Console.OutputEncoding
to Encoding.UTF8
it seems to be able to fix everything since the console printing is actually perfect. Does anyone have an idea how or why that is?
tl;dr: bi-directional strings are returning reversed, but only the non-English bits and brackets (I think, not clear). Any ideas on fixes?