A .NET plugin that needs to handle ANSI characters in
the range 128 to 255, including the $CustomChar's,
gets corrupted characters. The problem is that the
DNBridge does not convert to UTF8 when calling the
custom DLL and does not convert the high end
characters that are returned.
The issue is that characters above 127 in UTF8 have a
two character pair starting with 194 or 195 and then a
As an example a plugin that returns a string containing
an e-accute character returns 195:169 and not 233 and
Smartie displays this as two characters (A-tilda and
copywrite). DNBridge assumes 7 bit ASCII strings and
not 8 bit ANSI and treats them as UTF8.
The attached code is a standard C++ (non .NET) plugin
with function 2 converting the UTF8 string to ANSI. This
is my workaround, but is cumbersome. It would be
better if this code could be added to DNBridge in the
buffer returned from BridgeFunc. It would also be good
to carry out the reverse conversion with the params on
the way in.
Log in to post a comment.