From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.user Subject: Re: TeXmacs on Guile 2.2.4 Date: Sun, 26 May 2019 16:49:24 -0700 Message-ID: <20190526234924.GA17126@spikycactus.attlocal.net> References: <1D2A839C-66B5-4633-91B9-1C1ACFC306E7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233516"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.3 (2019-02-01) Cc: guile-user@gnu.org To: Massimiliano Gubinelli Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon May 27 01:50:07 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hV2tz-000yaF-8Z for guile-user@m.gmane.org; Mon, 27 May 2019 01:50:07 +0200 Original-Received: from localhost ([127.0.0.1]:37653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hV2ty-0001Wl-AH for guile-user@m.gmane.org; Sun, 26 May 2019 19:50:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hV2tY-0001WS-9w for guile-user@gnu.org; Sun, 26 May 2019 19:49:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hV2tV-0004pU-8k for guile-user@gnu.org; Sun, 26 May 2019 19:49:40 -0400 Original-Received: from sonic307-3.consmr.mail.bf2.yahoo.com ([74.6.134.42]:45830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hV2tV-0004nx-5K for guile-user@gnu.org; Sun, 26 May 2019 19:49:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1558914574; bh=U+5GJkODLGEZ19JRpvJeGTaJPltrvfo5rvzafsp7tiU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=posUMCel3WujGjPqjhig7bjWA07KnIZcPlUc1teOckZstslgY8jOEfDj34GU4u3EZ8SuAx3eTZadGW2tItKgvQo4TTdC+6rxEDXTdS9+8D3y6U1ABZ8QO8QWxMfQrXdXDEQBp86tNRqTUu0ZVvksZxjnhv2IpB64KsRY2i+CstVaAk/kb2FDty3BB5mpVqJ3/1FtXbfm0Kl3v4R1u0ATZPatoCNmtgjV0Q2Qv+bbLHiqL1IIJfJY5VfRJm7Hyt3gHBkjWacJw9Sja/31KlpnPd8bjzxE532mCwMD/P4dJg6wK3q0y9sqWM1FThPu2Pt92I3HP6d0r5B96pDmlMC+wQ== X-YMail-OSG: Brf.d5AVM1n8fK.nzktOUyN_4a_nYTeOd6myTg9fLdZmEXe9R6CFMsyIpSABCip lCBFeRNZXh4mB8Lggt9yB8tJPCPWaUZNTgonFy.n7xvPaji8Uh3C.G2V.XlLTE5DrhTstK5TA6pK fT1CPf8mKumuZMhaDjjZhd7j.2Jsl1pCJHrBAyF253mwr.fxcsSyMw_Ey_FeJvIZBWEov5ECVBl9 gAvoO1gwV_bkGgxPeVwdOBRydx0cRAwChGUtSzGi_KSSbUoxZNwJZOlOKyKPBUM5c4NH1fbless6 LrNoH9PuDbNsFTxslJItLOHUr5bYZ7TleJ5ZJ37HLIP0NWT43FN25LsiO.fSOrruaLEPRIAFMvT8 DM2p9qKB9om5xJao_Sb4gz5eJpabuOyn4E3mSmX66qI09vCZh3_ThS37LVjNlJvJYvKuT7lKZa54 K5Xek7AyZA66dvlbWW8AfYk8DYzAnbPVlceDLmMOlXtHLcAN4vApMe8JLcSIiOd4fVilfvr66npx nRoqW2SbseKli9bFrOK1FksQ0F8neWv0S20LJKYnWVlAP4hq6Y_RO25FKObq2uFUJUr8vW9olpTJ Pn.dGyZgXjnB46X8qAjg9nxMj.xn91MezrPouzeM8gx422.MQZdjD8WaAeZP6xxkU4_sOGzjTx3r vct44Rdn3YdPhlnZpzo_1q6UixdEOKWDm2bHpeb7Pf5Xg4VOETHCrLM.hrB32F_FAsocu_KmB26s XOOX1DgFl47nsmB5wLFIamQJF7CpwNfwSSl_Wg.BouQqdOBVrQ_Js4pR1UXMgZma2F8i962HrROF ugR46uCGYUyZboMw0jv4KWdV.e3q7K4iWQFAMJwtXa Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Sun, 26 May 2019 23:49:34 +0000 Original-Received: from 75-54-112-187.lightspeed.irvnca.sbcglobal.net (EHLO spikycactus.attlocal.net) ([75.54.112.187]) by smtp401.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 797148dbb328922b103a08402c7e9647; Sun, 26 May 2019 23:49:31 +0000 (UTC) Content-Disposition: inline In-Reply-To: <1D2A839C-66B5-4633-91B9-1C1ACFC306E7@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 74.6.134.42 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15500 Archived-At: On Sun, May 26, 2019 at 11:17:48PM +0200, Massimiliano Gubinelli wrote: > Hi all, > > I???m porting GNU TeXmacs (www.texmacs.org) to Guile 2.2.4 (and > hopefully to Guile 3.0). The current status is the > following. TeXmacs runs on Guile 2.2.4 with autocompilation turned > off: the applications opens and can read and render some > files. More work is necessary to switch on compilation. However > I???ve a problem with reading some TeXmacs files from the > disk. Some of them works OK, but others give errors while reading: > the file is first read into a C string by TeXmacs and then > converted into a SCM object for further manipulation by Guile. At > that point I receive this error message > Things works well with Guile 1.8, so I do not understand very well what is going on here. Somebody has some clue as to what could cause this problem? Hello, Back in Guile 1.8, it was easy to use strings as ways to read and write binary data because Guile 1.8 always used 8-bit characters. It had no real understanding of UTF-8. So for 1.8, the concept of strings and bytevectors could be used more or less interchangeably. Guile 2.2's string procedures now check that the data the receive makes sense according to the locale. You are probably reading in a file that isn't valid UTF-8 in a context where UTF-8 is expected, if you locale were something like fr_FR.utf8. Or maybe you are reading in a file that isn't pure ASCII when pure ASCII is expected, if your locale were 'C' or 'POSIX.' So you have two choices. You can temporarily set the locale to a Latin-1 locale, something like 'en_US.iso88591' before you read in the file, because, Latin-1 is an 8-bit clean locale. Or, the better idea is to use a binary port or bytevector to read in your data. Sorry I don't have time to be more specific. Regards, Mike