From sli@sdlintl.com  Mon Oct 16 03:53:01 2000
Received: from targa_server.dccchina.com ([168.160.249.133])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id DAA04698
	for <prolog@swi.psy.uva.nl>; Mon, 16 Oct 2000 03:52:58 +0200 (MET DST)
Received: from stephen (somewhere.fmi.com [157.43.20.95]) by targa_server.dccchina.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9)
	id 45ARZR8Y; Mon, 16 Oct 2000 09:43:23 +0800
Reply-To: <sli@sdlintl.com>
From: "Stephen" <sli@sdlintl.com>
To: <prolog@swi.psy.uva.nl>
Subject: pass chinese string variable between C++ and Prolog
Date: Mon, 16 Oct 2000 09:52:59 +0800
Message-ID: <NFEOJJODNDJNCCEBKNCKGEBMCBAA.sli@sdlintl.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="gb2312"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by swi.psy.uva.nl id DAA04698

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

