Unicode Support ROException


(Porsche Informatik Gmb H) #1

we have a problem according to Exception Handling in RemObjects. The thing is, that I don’t know if it is on the server or client side.

In our system we’re able to execute some SQL-Queries on the client side, which get’s redirected to the server-side. When there’s an error on server side (eg. “Table not found”). In countries with special characters (eg. Hungary) we have the problem, that these characters are not shown properly.

My first guess was that it has to do something with Unicode/Ansistring conversion. So i changed in the exception handling method the line
TROSerializer(ASerializer).ReadAnsiString('Details', l_Details); to
TROSerializer(ASerializer).ReadUnicodeString('Details', l_Details);
and the same with WriteException, but it didn’t work.

What am I missing?

Thanks in advance!
BR, Larissa

(Porsche Informatik Gmb H) #2

Hi again,
so now it works. I found out, that the change of ReadAnsiString to ReadUnicodeString destroyed everything. But the change of WriteAnsiString to ****UnicodeString (in the WriteException part) was the solution.

But why does the characters become strange when in the ReadExecption part a Unicodestring is read?

Thanks for your reply!
BR, Larissa

(EvgenyK) #3

for backward compatibility we still send exceptions in ANSI format, but you can set TROBinMessage.SendExceptionInUnicode to true on both sides

(Porsche Informatik Gmb H) #4

Thank you for the fast response!
We’ve already done this. So it is enough to unicodify the WriteException, right?
BR, Larissa

(EvgenyK) #5

it will send exceptions in UTF8 format instead of Ansi one
note: both sides (client & server) should use the same values of this property.

(Porsche Informatik Gmb H) #6

Ahhh thank you!
I didn’t notice, that we create the ROBinMessage dynamically on the client side.
Now Unicode works in both methods (Read-/WriteException).
BR, Larissa