Subject: pass chinese string variable between C++ and Prolog

From: "Stephen" <[email-masked]>
Date: Mon, 16 Oct 2000 09:52:59 +0800

Dear,
How are you!
Now i meet a question about C++ calling Prolog,  Can anybody help me?

Question is
I put a english string to Prolog variable( from ), and then get this string from it, the result is right. just as follows:

	SP_term_ref from;
	SP_put_string(from = SP_new_term_ref(), "country");
	char* lp2 = NULL;
	int nRet = SP_get_string(from,&lp2);

But i put a chinese string to the variable (from), and then get the string, the return value (nRet) is 1, the point lp2 is "[]",
	
	SP_term_ref from;
	SP_put_string(from = SP_new_term_ref(), "祖国");
	char* lp2 = NULL;
	int nRet = SP_get_string(from,&lp2);

What happened and What can i do for it?

Regards.

Stephen