Hi Bill,

SHORT ANSWER: No

----------------------------------

LONG ANSWER:

In my tests, I found out that doing the following from C# WOULD work:
string strTemp = "对最后问题的答复。";
jSession.Eval("test2=: '" + strTemp +"'");

but doing the following WILL NOT work:
string strTemp = "对最后问题的答复。";
jSession.Variable("test2", strTemp);

-----------------------------------

Unfortunately, the data that I need to pass to J comes from an MS-SQL database 
so it's a 2 dimension table where I literally copy each cell from a .NET 
DataTable into a 2 dimensional object array -->> object[,]

Oleg actually suggested some stuff in the wiki in handling Unicode string using 
Set() and Get() function but it would entail translating your data into byte 
arrays and jumping through hoops just to return the data in the correct format. 

I do know that I can brute force the issue by not sending any string to J and 
just the numbers and lookup the matching data again in C#. Unfortunately, this 
will defeat the purpose of using J to process the data and it would mean 
massive changes both in our J codes and C#. Also, I am trying to leverage on 
J's native matrix processing and moving codes to C# would mean that I have to 
implement the double for loops where process each rows then each columns for 
each rows like so:

for (int y = 0; y < noOfRows; y++)
{
  for (int x = 0; x < noOfColums; x++)
  {
    //process data by accessing jResult[y,x]
  }
}

The code above is something that I had hoped never to code again. :P

r/Alex

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:programming-
> [EMAIL PROTECTED] On Behalf Of bill lam
> Sent: Thursday, October 18, 2007 10:16 PM
> To: Programming forum
> Subject: Re: [Jprogramming] unicode string inside arrays
> 
> Did you mean that it is OK to passing unicode string as a single
> string?
> 
> --
> regards,
> bill
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to