Since wd is expecting an ordinary character string, you can construct
one from the unicode data with an expression like:
a. {~ ,|."1 [ 256 256 #: 3 u: data
The VB DLL will need some way of recognizing that this is a 2 byte
unicode character string, and not a regular 1 byte character string.
Alex Rufon wrote:
> I know that everyone should be upgrading to J601 but my client is
> running a production system in China and I'm in the Philippines so
> updates are a bit tricky.
>
> So here's the problem. I have a VB6 COM DLL which exposes a Function
> that accepts and returns strings. The actual CODE in J is like this:
> vdata=. wd 'olemethod r base executeSQL *', y.
>
> You may guess that what this is doing is executes SQL DDL commands and
> return the results as string. There were no problems with this code up
> until then started encoding with Traditional Chinese characters.
>
> Returning UNICODE characters from wd is not a problem since all I had to
> do was change the code to:
> vdata=. u: wd 'olemethod r base executeSQL *', y.
>
> The problem is when y. (the SQL DDL statement) is now in Unicode format.
> When y. is UNICODE ... 11!:0 is throwing a Domain Error.
>
> I would appreciate any suggestion no matter how far fetch it is. It's a
> measure of my desperation with the situation. ;)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm