From guido@dunker.com  Sun Dec 10 22:02:12 2000
Received: from c000.snv.cp.net (c000-h000.c000.snv.cp.net [209.228.32.64])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id WAA05980
	for <prolog@swi.psy.uva.nl>; Sun, 10 Dec 2000 22:02:11 +0100 (MET)
Received: (cpmta 4779 invoked from network); 10 Dec 2000 13:01:58 -0800
Received: from u-218-0.berlin.ipdial.viaginterkom.de (HELO dunker.com) (62.180.0.218)
  by smtp.dunker.com (209.228.32.64) with SMTP; 10 Dec 2000 13:01:58 -0800
X-Sent: 10 Dec 2000 21:01:58 GMT
Message-ID: <3A354294.4626498F@dunker.com>
Date: Mon, 11 Dec 2000 22:09:40 +0100
From: Guido Dunker <guido@dunker.com>
X-Mailer: Mozilla 4.6 [de]C-CCK-MCD QXC03201  (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: prolog@swi.psy.uva.nl
Subject: Re: swi jpl character coding
References: <200012101301.OAA21993@gollem.swi.psy.uva.nl>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Jan,

ok, if i have time i will change Fred's code in the foreign interface
jpl_fli_Prolog.c
if i succeed, i will post this.

danke und Gruesse

    Guido

Jan Wielemaker schrieb:

> > > Hi,
> > >
> > > i use jpl-1.0.1 together with 3.4.2. In my Prolog Demo i use some
> > > german "Umlaute" like ÄÖÜöäüß.
> > > All these characters are mapped to ASCII 128 on the Java side.
> > >
> > > What can i do?
> >
> > Are you using umlautes in atoms or strings?  And I assume this is in
> > your Prolog code, yes?
> >
> > Converting from Prolog to Java, a char array is obtained from
> > the FLI PL_get_atom_chars function, which returns char *, which in turn
> > is converted to a Java String using NewStringUTF.
> >
> > I guess I see two opportunities for things to go awry; either the
> > PL_get_atom_chars is just returning the high order byte of the umluate
> > char, or the NewStringUTF is not respecting the UTF encoding.
> >
> > Jan, how are atoms encoded in the prolog vm?  As UTF?
>
> No.  As yet it is encoded as an unsigned char * with length, so it can
> contain 0-bytes.  So it cannot represent characters outside the range
> 0..255, which you can use with any 8-bit encoding for which the lower
> 128 characters match the ASCII set.  It is planned to change this to
> use UTF-8, probably somewhere next year.
>
>         Cheers --- Jan
>
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>
> or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
>
> ** An ARCHIVE of this list is maintained at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/

