From jan@swi.psy.uva.nl  Mon Oct 16 09:58:41 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id JAA09326;
	Mon, 16 Oct 2000 09:58:41 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id JAA04680;
	Mon, 16 Oct 2000 09:59:26 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: <sli@sdlintl.com>, "Stephen" <sli@sdlintl.com>, <prolog@swi.psy.uva.nl>
Subject: Re: pass chinese string variable between C++ and Prolog
Date: Mon, 16 Oct 2000 09:58:07 +0200
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <NFEOJJODNDJNCCEBKNCKGEBMCBAA.sli@sdlintl.com>
In-Reply-To: <NFEOJJODNDJNCCEBKNCKGEBMCBAA.sli@sdlintl.com>
MIME-Version: 1.0
Message-Id: <00101609592500.04644@gollem.swi.psy.uva.nl>
Content-Transfer-Encoding: 8bit

On Mon, 16 Oct 2000, Stephen wrote:

>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?

Aren't you mixing up mailinglists?  This looks like a SICStus Prolog
problem to me :-)

	Regards --- Jan

